home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / yrndl153.zip / YDINSTL.CMD < prev   
OS/2 REXX Batch file  |  1997-03-13  |  154KB  |  4,709 lines

  1. /*
  2. YDINSTL.CMD v 1.53 by Jerry Levy 13 Mar 97
  3. Comments appreciated: send to jlevy@ibm.net
  4. (Jerry Levy, Marblehead, MA USA)
  5. */
  6. version = '1.53'
  7.  
  8. /*
  9. ===========History============
  10. See YD.DOC for details.
  11.  
  12. YARNDIAL.CMD v. 1.53   13 Mar 97
  13.   Some fixes
  14.  
  15. YARNDIAL.CMD v. 1.52 (GA Release)   04 Mar 97
  16.   Numerous small changes/customization/corrections so runs
  17.   equally well under Object ReXX as well as Classic ReXX
  18.  
  19. YARNDIAL v. 1.50     25 Jan 97
  20.    Final beta.
  21.    Added: multiple ISP's
  22.  
  23. YARNDIAL v. 1.42 (several betas)     to 25 Jan 97
  24.    Bug-catching in YARNDIAL.CMD.
  25.    Support for use of VSOUP (VSOUP1.2.5) as alternative to SOUPER.
  26.    Eliminated TIMER.CMD (see README.1ST, YD.DOC).
  27.    Changes in YDINSTL, mostly related to VSoup support.
  28.    Souper and VSoup _xtra_options changed
  29.  
  30. ========ERROR TRAPPING============
  31. We can trap and identify various types of ReXX error
  32. conditions:  Error, Syntax, Failure, Novalue, Halt
  33. and Notready, by setting 
  34.         local_error_trapping = 0
  35.  
  36. Default is
  37.         local_error_trapping = 0
  38. but if you have problems, briefly setting local_error_trapping = 1
  39. may help you identify source of an error.
  40. ==================================
  41. */
  42. local_error_trapping = 0
  43.  
  44. /*
  45. ================WHAT DO WE DO?================================
  46. YDINSTL.CMD is a Rexx program to install YARNDIAL.
  47.  
  48. YARNDIAL is a program to automate the use of YARN and SOUPER
  49. It serves as a front end for C.T. Huang's OS/2 Souper and Yarn programs. 
  50.  
  51. YD.DOC is documentation for both the installer and YARNDIAL.
  52.  
  53. README.1ST is YD.DOC boiled down to essentials.
  54.  
  55. This installer goes out and fetches parameters required by
  56. YARNDIAL.  Installations can be done for every yarn user you
  57. have set up.  Read YD.DOC to learn more about setting up for
  58. multiple users (A different "user"  a different ID,
  59. an installation for a different internet provider, or a
  60. different internet connection mode for a given ID).
  61.  
  62. Each different user for which you set up YARN has been assigned
  63. its own home directory and you can (should) do an install with
  64. YDINSTL.CMD for each.  For each installation, separate Desktop
  65. objects are created which are named to uniquely tie them to a
  66. particular installation.  For each installation, a unique
  67. parameter file (YD_PARMS.DAT) is created and stored in the
  68. home directory.
  69.  
  70. YDINSTL.CMD also creates a suite of useful Rexx .CMD utilities
  71. which are placed in the home directory also.
  72.  
  73. This YDINSTL.CMD v. 0.94 is distributed with YARNDIAL v1.34
  74.  
  75. ==========COPYRIGHT NOTICE AND DISCLAIMER=============
  76. YDINSTL.CMD is Copyright 1996-7 by Jerry Levy (all rights reserved)
  77. YARNDIAL.CMD is Copyright 1995-7 by Jerry Levy (all rights reserved)
  78.  
  79. These are provided as-is and without charge, with no warranty expressed
  80. or implied as to merchantability or fitness for any particular purpose.  All
  81. responsibility for any and all incidental and consequential damages is
  82. disclaimed.  These programs and associated text files are freeware.  They
  83. may be distributed without restriction providing: (1) this notice and
  84. disclaimer remain intact, (2) all programs and files are included and
  85. unchanged, and (3) they are distributed either in the original .zip archive
  86. or the archive after being unzipped into a folder or onto a disk or other
  87. medium.  Use of either or both of these programs constitutes acceptance
  88. of these terms by all users.
  89. ======================================================
  90. */
  91.  
  92. bs = d2c(8)
  93. tab = d2c(9)        /* Backspace */
  94. cr = d2c(13)        /* enter key, as well as carriage return */
  95. crlf = d2c(13) || d2c(10)        /* carriage return + linefeed */
  96. escape = d2c(27)        /* escape character */
  97. X1 = d2c(0)        /* Extended key */
  98. X2 = d2c(224)        /* Extended key */
  99.  
  100. /* Load RexxUtil if not already loaded */
  101. if RxFuncQuery('SysLoadFuncs') \= 0 then
  102.    do
  103.       call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  104.       call SysLoadFuncs
  105.    end
  106.  
  107. candidate = ''
  108. encrypt = 0
  109. connection_type = 0
  110. piggyback = 0
  111. edit_dialup_string_msg = ''
  112.  
  113. parse arg instr candidate
  114. if translate(instr) = 'ENCRYPT' then
  115.    do
  116.       call SysCls
  117.       say ''
  118.       encrypt = 1
  119.       call encry
  120.       exit
  121.    end
  122.  
  123. /* Initialize these filenames */
  124. yd_doc = 'YD.DOC'        /* documentation file */
  125. readme_1st = 'README.1ST'        /* shorter one */
  126. ydparms_dat = 'YD_PARMS.DAT'        /* where we will store parameters */
  127. ydaltparms_dat = 'YD_ALT.DAT'        /* where we store alternate parameters */
  128. yd_cmd = 'YARNDIAL.CMD'        /* this is the YarnDial file we are installing for */
  129. ydinstl_cmd = 'YDINSTL.CMD'        /* and this is us, the installer */
  130. yarn_ico = 'YARN.ICO'        /* the Yarn icon (courtesy of C.T. Huang) */
  131. yarnshell_ico = yarn_ico        /* ...which we use more than once */
  132. yarndial_ico = 'YARNDIAL.ICO'        /* the YarnDial icon */
  133. ydfold1_ico = 'YDFOLD1.ICO'        /* for our desktop folder: icon for when it is closed */
  134. ydfold2_ico = 'YDFOLD2.ICO'        /* for our desktop folder: animated icon, folder when open */ 
  135. yarnutil_ico = 'YRNUTIL.ICO'        /* for yarnutil_cmd */ 
  136. logoff_ico = 'LOGOFF.ICO'        /* for logoff_cmd */ 
  137. renewzip_ico = 'RENEWZIP.ICO'        /* for renewzip_cmd */ 
  138. ydinstl_ico = 'YDINSTL.ICO'        /* for ydinstl_cmd */
  139.  
  140. /*
  141. ===========
  142. parse version returns the following for these 
  143. different ReXX's:
  144.  
  145. REXXSAA
  146. REXX 4.00 (various dates for various distributions)
  147.  
  148. OBJECT REXX (distributed with Warp 4.0)
  149. OBJREXX 6.00 12 Jul 1996
  150. ============
  151. */ 
  152.  
  153. os2Obj_Rexx = 'OBJREXX'
  154. os2Classic_Rexx = 'REXXSAA'
  155.  
  156. parse version rxsystem
  157. rexx_type = translate(rxsystem)
  158.  
  159. if local_error_trapping then signal on failure
  160. if local_error_trapping then signal on halt
  161. if local_error_trapping then signal on syntax
  162. if local_error_trapping then signal on notready
  163. if local_error_trapping then signal on error
  164. if local_error_trapping then signal on novalue
  165.  
  166. Trace 'N'
  167.  
  168. call time 'R'
  169. yd_cmd_v = '2.0'
  170.  
  171. /*
  172. ============================
  173. We use Abandon=1 returned by a subroutine
  174. as a signal to abort.  We abort by making a
  175. conditional call to exit in the caller routine,
  176. example:     if Abandon then signal goodbye()
  177. ============================
  178. */
  179.    Abandon = 0
  180.  
  181. /* Completed flag will be set to 1 when we are done */
  182.    completed = 0
  183.  
  184. /* These are set to 1 or cleared for (certain) in-joy errors */
  185.    other_err = 0
  186.    ijparms_err1 = 0
  187.    ijparms_errmsg1 = ''
  188.    ijparms_err2 = 0
  189.    ijparms_errmsg2 = ''
  190.  
  191. /* We count file-search errors */
  192.    findfile_ErrNum = 0
  193.  
  194. /* if an error when we try to create objects, we set to  1 */
  195. object_creation_error = 0
  196.  
  197.  
  198. Upcase = xrange('A', 'Z')        /* Translation tables we use for going */
  199. Lowcase = xrange('a', 'z')        /* from upper to lower case */
  200.  
  201. parse source with this_pgm
  202. /* This program including path is last word.  Extract its
  203. path, stripping out a final \ */
  204.  
  205. this_pgm = word(this_pgm, words(this_pgm)) /* we are last word if more than one */
  206. source_drive = filespec('drive', this_pgm) /* get our drive...*/
  207. source_subdir = filespec('path', this_pgm) /* ...and dir */
  208. source_path = source_drive || source_subdir /* reconstruct path... */
  209. source_path = strip(source_path, 'T', '\')  /* ...removing terminal backslash */
  210. source_path = translate(source_path)        /* Looks prettier in upper case */
  211. x = SetLocal()
  212.  
  213. '@echo off'        /* do not echo OS/2 commands */
  214. call welcome_to_this_installer        /* big welcome message */
  215. call initialize_variables
  216.  
  217. /*
  218. =============
  219. Do we use the IAK Dialer, the Dial-Other-
  220. Internet-Providers utility, or a dialup string?
  221. =============
  222. */
  223. call get_connection_type
  224. call get_ini_paths        /* for dialer.ini and tcpos2.ini */
  225. call find_yarn_home_dir        /* set as an os/2 environment variable? or we can specify it */ 
  226. call find_yarn_dir        /* YARN, set as an os/2 environment variable */
  227.  
  228. /* read in some assignments from the Yarn CONFIG file */
  229. call get_parms_from_yarn_config
  230.  
  231. /*
  232. ============
  233. If connection_type = 4 or 5 we need to get dialer filename.
  234. Then, depending on dialer we chose, we can get our
  235. parameters from a previously set up SLIPPM entry
  236. or we ask to be prompted for them for keyboard entry.
  237.  
  238. The get_alt_dialer_exe routine gets the full path to
  239. the dialer, and also strips any options that may have been
  240. entered and then generates (except for slippm)
  241. alt_dialer_exe        fully qualified path and name
  242. alt_dialer_dir        drive and path part with final '\'
  243. alt_dialer_path        drive and path part without final '\'
  244. alt_dialer_name        filename without drive or path
  245. alt_dialer        file part of file.ext
  246.  
  247. alt_dialer_exe is not likely to be the IAKdialer which
  248. is covered by connection_type 1, nor is it likely to be
  249. PPP.EXE or SLIP.EXE either, both of which are covered by
  250. connection_type 3. 
  251. ==================
  252. */
  253. if pos(connection_type, '45') \= 0 then
  254.    do
  255.       call get_alt_dialer_exe
  256.  
  257.       select
  258.         when alt_dialer_exe = 'SLIPPM' | alt_dialer_exe = SLIPPM_EXE,
  259.          | alt_dialer = 'SLIPPM' then
  260.         do
  261.            alt_dialer_exe = SLIPPM_EXE
  262.            alt_dialer_name = SLIPPM_EXE
  263.            alt_dialer = 'SLIPPM'
  264.            alt_dialer_path = ''
  265.         end
  266.  
  267.          when alt_dialer_name \= SLIPPM_EXE,
  268.          & alt_dialer_name \= ILINK2_EXE then
  269.          call should_we_piggyback_on_slippm
  270.  
  271.          otherwise NOP
  272.       end        /* of Select */
  273.    end
  274.    
  275. if connection_type = 3 then
  276.    call should_we_piggyback_on_slippm
  277.  
  278. select    /* for different connection types */
  279.    when connection_type = 1 then
  280.       do
  281.          service = 'SLIP'
  282.         /* dialer.ini stores the IAK Dialer parameters... */
  283.          call get_parms_from_advantis_dialerini
  284.          call get_passw_POP3PWD
  285.          PWD = POP_PWD        /* for IBM/IGN/Advantis */
  286.         /* construct the dialup_string */
  287.          dialup_string ='''start' IAKdialer_exe || ''' account login_id.1 pop_pwd.1'
  288.          alt_dialer_exe = translate(IAKdialer_exe)
  289.          alt_dialer_name = 'DIALER.EXE'
  290.          alt_dialer = 'DIALER'
  291.          alt_dialer_path = ''
  292.       end
  293.  
  294.    when pos(connection_type, '345') \= 0 then
  295.       do
  296.          if piggyback then
  297.         do
  298.            host_app = get_dial_other_providers_app(tcpos2_ini)
  299.            call get_parms_from_tcpos2ini
  300.            if alt_dialer = 'IN-JOY' then call get_injoy_parms
  301.        end
  302.       else
  303.         do
  304.            if alt_dialer = 'IN-JOY' then
  305.         do
  306.            call get_injoy_parms
  307.         end
  308.         if alt_dialer \= 'IN-JOY' & \ijparms_err1 & \ijparms_err2 then
  309.         do
  310.            call get_dialer_app /* argument dialer uses to connect */
  311.            call get_domain
  312.            call get_login_id
  313.            if alt_dialer = 'IN-JOY' then call get_interface_prefix
  314.            call get_comport
  315.         end
  316. /* These get prompted-for for all dialers if piggyback = 0 */
  317.          call get_userID
  318.          call are_we_SLIP_or_PPP
  319.          call get_nameservers
  320.          call get_pop3mail_server
  321.          call get_smtp_server
  322.          call get_news_server
  323.          call get_passw_POP3PWD
  324.          call get_passw_PWD
  325.       end    /* of else clause */
  326.    end        /* of Do, for "when pos(connection_type, '345') \= 0" */
  327.  
  328.     otherwise NOP
  329. end /* of select, for different connection types */
  330.  
  331. if connection_type = 3 & service = 'SLIP' then
  332.    do
  333.      alt_dialer_exe = 'SLIP.EXE'
  334.      alt_dialer_name = 'SLIP.EXE'
  335.      alt_dialer_path = ''
  336.      alt_dialer = 'SLIP'
  337.      dialup_string ='''start /c' alt_dialer_name || ''' **FILL IN REMAINDER...**'
  338.    end
  339. if connection_type = 3 & service = 'PPP' then
  340.    do
  341.      alt_dialer_exe = 'PPP.EXE'
  342.      alt_dialer_name = 'PPP.EXE'
  343.      alt_dialer_path = ''
  344.      alt_dialer = 'PPP'
  345.      dialup_string ='''start /c' alt_dialer_name || ''' **FILL IN REMAINDER...**'
  346.    end
  347.  
  348. if pos(connection_type, '45') \= 0 then 
  349.    select   /* different alt_dialer_name's */
  350.       when alt_dialer_name = SLIPPM_EXE then
  351.          do
  352.             dialup_string ='''start' slippm_exe || ''' host_app'
  353.          end
  354.  
  355.       when alt_dialer_name = ILINK2_EXE then
  356.          do
  357.             dialup_string = 'do;',
  358.             '''' || alt_dialer_drive || ''';',
  359.             '''cd' alt_dialer_dir || ''';',
  360.             '''start /N' alt_dialer_exe || ''' host_app;',
  361.             'end'
  362.       end
  363.  
  364.       when alt_dialer_name = 'SLIP.EXE' | alt_dialer_name = 'PPP.EXE' then
  365.          do
  366.             dialup_string ='''start' alt_dialer_name || ''' **FILL IN REMAINDER...**'
  367.          end
  368.       when alt_dialer_name = IAKDialer_exe then
  369.          do
  370.             service = 'SLIP'
  371.         /* dialer.ini stores the IAK Dialer parameters... */
  372.             call get_parms_from_advantis_dialerini
  373.             call get_passw_POP3PWD
  374.             PWD = POP_PWD        /* for IBM/IGN/Advantis */
  375.         /* construct the dialup_string */
  376.             dialup_string ='''start' IAKdialer_exe || ''' account login_id.1 pop_pwd.1'
  377.             alt_dialer_exe = IAKdialer_exe
  378.          end
  379.  
  380.       when alt_dialer_name = INJOY_EXE then
  381.          do
  382.             dialup_string = 'do;',
  383.             '''' || alt_dialer_drive || ''';',
  384.             '''cd' alt_dialer_dir || ''';',
  385.             '''start /N' alt_dialer_exe || ''' host_app;',
  386.             'end'
  387.          end
  388.  
  389.  
  390.       otherwise        /* any other dialer not mentioned */
  391.          dialup_string = 'do;',
  392.            '''' || alt_dialer_drive || ''';',
  393.            '''cd' alt_dialer_dir || ''';',
  394.            '''start /N' alt_dialer_exe || ''' host_app;',
  395.            'end'
  396.    end  /* of select for different alt_dialer_exe's */ 
  397.  
  398. if alt_dialer_name \= INJOY_EXE then
  399.    do
  400.       interf_prefix = service
  401.       if service = 'SLIP' then interf_prefix = 'SL'
  402.    end
  403.  
  404. /* What soup transfer program are we using for mail and news? */
  405. call are_we_using_souper_or_vsoup
  406.  
  407. /* What kind of compression utilities? InfoZip's? PkWare's? others'? */
  408. call whose_zips_are_we_using
  409.  
  410. /* Do searches for files we need.  Gets full paths */
  411. call search_for_files
  412.  
  413. /* Tailor how you want souper to run: can modify some command-line options */
  414. call souper_options
  415.  
  416. /* Choice whether or not to allow connection to remain up after all
  417. transfers are completed (change in main YARNDIAL menu)
  418. and prompt for the alternate characters to use to do it */
  419.  
  420. call enable_dnk_option
  421. call get_dnk_string
  422.  
  423. /* How many seconds before dialer times out (for connection_type 1, 2, and 3) */
  424. call get_dialer_timeout_wait
  425.  
  426. /* Set size of maximized window for yrnshell_cmd runs */
  427. call get_shell_windowsize
  428.  
  429. /* How deal with phantom interface problem? */
  430. call set_interf_removal
  431.  
  432. /* Up to this point, no changes have been made.  A chance
  433. to exit the install at this point without making any changes */
  434. call chance_to_quit
  435.  
  436. /* Create the YD_PARMS.DAT file where all our parameters go.
  437. YARNDIAL.CMD uses this file as a setup file */
  438. call output_dat
  439.  
  440. /* Copy files over from installation directory to home dir */
  441. call copy_ydfiles
  442.  
  443. /*
  444. ==============
  445. We create a suite of five customized REXX utilities on the HOME directory.
  446.  
  447. YARNSHELL.CMD:  Runs YARN.EXE from the correct environment for this user
  448.  
  449. YARNUTIL.CMD:  Run any yarn utility pgm for this user
  450.  
  451. RENEWZIP.CMD:  Restores the reply_packet .ZIP file (backed up during
  452.    an attempt to export) for a re-try later (RENEWZIP.CMD), again for this user
  453.  
  454. LOGOFF.CMD:  Provides a convenient way to log off
  455.  
  456. OBJECTS.CMD:  Restores a folder object and contents (objects for the four
  457. .CMD files above, plus an object for YarnDial.CMD, for this user installation
  458. ==============
  459. */
  460. call create_yarnshell_cmd
  461. call create_yarnutil_cmd
  462. call create_logoff_cmd
  463. call create_renewzip_cmd
  464. call create_yarndial_objects
  465.  
  466. /* Finally we create a Rexx pgm to recreate objects */
  467. call recreate_objects_cmd
  468. signal goodbye        /* cleanup and exit */
  469. EXIT
  470. /*
  471. ==============================================
  472. End of Main Program
  473. ==============================================
  474. */
  475.  
  476. /*
  477. ==============================================
  478. get_connection_type()
  479.  
  480. Are we installing for a connection to IBM/IGN/Advantis
  481. via the IAK Dialer
  482.    or
  483. a connection via either SLIP or PPP using the
  484. Dial-Other-Internet-Providers Utility?
  485. ==============================================
  486. */
  487. get_connection_type:
  488. edit_dialup_string_msg =  ''        /* initialize to a blank */
  489. call SysCls
  490. say ''
  491. say 'CONNECTION-TYPE SCREEN'
  492. say 'You must select the type of connection you will be making'
  493. say 'to your Internet Service Provider'
  494. say ''
  495. say 'How will you dial in to connect?'
  496. say '  1 With the IAK Internet Dialer to connect to IBM/IGN/Advantis (SLIP)'
  497. say '  2 (Reserved)'
  498. say '  3 With a slip.exe or ppp.exe dialup string'
  499. say '  4 Using SLIPPM (IBM''s Dial-Other-Internet-Providers Utility),'
  500. say '    a SLIPPM replacement dialer (e.g., ILINK/2, IN-JOY, etc.),'
  501. say '    or other dialer'
  502. say '  5 I will try to set up' ydparms_dat 'manually (read' yd_doc || '),'
  503. say '    but help me do a partial setup'
  504. say ''
  505. say ' FOR OPTIONS 3 and in some cases 4: the IBM utility SLIPPM.EXE'
  506. say ' (''Dial-Other-Internet-Providers'') may need to be configured'
  507. say ' properly beforehand even if you will use your own dialup string'
  508. say ' or another dialer to dial up.'
  509. say ' Reason: SLIPPM stores parameters that we need where we can'
  510. say ' get at them.'
  511. say ''
  512. do until pos(connection_type, '1345') \=0
  513.    say ''
  514.    prompt = 'Select 1, or 3-5, or Escape to quit:'
  515.    say prompt
  516.       parse value SysCurPos() with row col
  517.       row  = row - 1
  518.       col = length(prompt) + 2
  519.       call SysCurPos row, col
  520.    connection_type = SysGetKey('NOECHO')
  521.    if connection_type = escape then signal goodbye
  522. end
  523. say ''
  524.  
  525. if connection_type = 1 then
  526.    do
  527.       say 'Selected: IBM/IGN/Advantis IAK Dialer.        '
  528.    end     
  529.  
  530. if connection_type = 3 then
  531.    do
  532.       say 'Selected: Dialup with a ppp.exe or slip.exe dialup string'
  533.       edit_dialup_string_msg = crlf ||,
  534.       'Remember to fill in the dialup_string called',
  535.       'for in' ydparms_dat
  536.    end     
  537.  
  538. if connection_type = 4 then
  539.    do
  540.       say 'Selected: SLIPPM, a SLIPPM replacement, or other dialer.'
  541.    end     
  542.  
  543. if connection_type = 5 then
  544.    do
  545.       say 'Selected: Mostly manual configuration (by editing' ydparms_dat || ').'
  546.       edit_dialup_string_msg = crlf ||,
  547.       'Remember to manually revise (edit)' ydparms_dat
  548.    end     
  549.  
  550. say ''
  551. say 'Press any key to continue'
  552. call SysGetKey'ECHO'
  553. RETURN
  554.  
  555.  
  556. /*
  557. ==============================================
  558. Determine paths to DIALER.INI and TCPOS2.INI
  559. ==============================================
  560. */
  561. get_ini_paths:
  562. dialerini_exists = 0
  563. tcpos2ini_exists = 0
  564. tcpip_etc_path = value('etc', , 'OS2ENVIRONMENT')
  565. dialer_ini = tcpip_etc_path || '\' || 'dialer.ini'
  566. if stream(dialer_ini, 'c', 'query exists') \= '' then
  567.    do
  568.       dialerini_exists = 1
  569.    end
  570. tcpos2_ini = tcpip_etc_path || '\' || 'tcpos2.ini'
  571. if stream(tcpos2_ini, 'c', 'query exists') \= '' then
  572.    do
  573.       tcpos2ini_exists = 1
  574.    end
  575. RETURN
  576.  
  577. /*
  578. ==============================================
  579. Locate the Yarn HOME directory.  It  set as an
  580. OS/2 environmental variable, but if it isn't, prompt us
  581. for it.  You can install Yarn with separate home directories
  582. for each user.  A lot of other applications set up HOME
  583. as an environmental variable so the home directory in the
  584. OS/2 environment may not be the correct one for this
  585. installation.
  586.  
  587. To determine if we have the right home directory we look
  588. for Yarn's config file which is located in home's /yarn/
  589. subdirectory.
  590. ==============================================
  591. */
  592. find_yarn_home_dir:
  593. /* Get the Yarn Home Directory */
  594. entry = ''        /* initialize it to a blank */
  595.  
  596. call SysCls
  597. say ''
  598. say 'YARN''s HOME DIRECTORY SCREEN'
  599.  
  600. home = value('home', , 'OS2ENVIRONMENT')
  601. home = translate(home)
  602. yarn_config = home || '\yarn\config'
  603. if home = '' then
  604.    do
  605.       say ''
  606.       say 'Unable to find HOME as an OS/2 environment variable.'
  607.       say 'That means you did not include a SET HOME statement in'
  608.       say 'config.sys or you did not reboot after modifying config.sys,'
  609.       say 'neither of which is a problem since you will be able to'
  610.       say 'enter the path for your HOME directory now.'
  611.       say ''
  612.    end
  613. if stream(yarn_config, 'c', 'query exists') \= '' then
  614.    do
  615.       say ''
  616.       say 'We found' home 'as a possible YARN home directory.'
  617.       say ''
  618.       say 'You may have set up Yarn with more than one user'
  619.       say 'and more than one home directory or this '
  620.       say 'another program''s home directory.'
  621.       say ''
  622.       say 'To accept   ' home '   as the home directory press ENTER,'
  623.       say 'or key in the full path of the Yarn HOME directory you wish'
  624.       prompt = 'to do this installation for:'
  625.          say prompt
  626.          parse value SysCurPos() with row col
  627.          row  = row - 1
  628.          col = length(prompt) + 2
  629.          call SysCurPos row, col
  630.       pull entry
  631.    end 
  632. if entry \= '' then home = entry
  633. home = strip(home, 'B')
  634. yarn_config = home || '\YARN\CONFIG'
  635. do forever
  636.    if stream(yarn_config, 'c', 'query exists') \= '' then
  637.       do
  638.          leave
  639.       end
  640.          say ''
  641.          if home = '' then say 'The home directory is undefined.'
  642.          if home \= '' then
  643.             do
  644.                say ''
  645.                say 'Unable to find' yarn_config '(HOME dir is in error)'
  646.                say translate(home) 'as HOME directory is in error.'
  647.             end
  648.          prompt = 'Enter your Yarn HOME directory path now:'
  649.          say prompt
  650.          parse value SysCurPos() with row col
  651.          row  = row - 1
  652.         col = length(prompt) + 2
  653.          call SysCurPos row, col
  654.          pull entry
  655.          entry = strip(entry, 'T', '\')       /* strip any trailing \ if entered */
  656.          home = entry
  657.          yarn_config = home || '\yarn\CONFIG'
  658. end
  659.  
  660. yarn_config = home || '\yarn\CONFIG'
  661. yarn_config = translate(yarn_config)
  662. home_drive = filespec('drive', yarn_config)
  663. home_drive = translate(home_drive)
  664. ydparms_dat = home || '\' || ydparms_dat
  665. ydparms_dat = translate(ydparms_dat)
  666.  
  667. say ''
  668. say 'Installing for' home 'as the Yarn HOME directory.'
  669. say ''
  670. say ''
  671. say 'OK.  Press any key to continue'
  672. call SysGetKey 'NOECHO'
  673. RETURN
  674.  
  675. /*
  676. ==============================================
  677. Where is the Yarn directory?
  678.  
  679. We look for yarn in the OS/2 environment.  If we don't
  680. find it we exit install.  All of the yarn files should
  681. be there:
  682.    import.exe
  683.    export.exe
  684.    rebuild.exe
  685.    expire.exe
  686.    yarn.exe      and more
  687. but we search for yarn.exe to verify it is (probably)
  688. a valid YARN directory.
  689. ==============================================
  690. */
  691.  
  692. find_yarn_dir:
  693. /* Get the Yarn Directory */
  694. entry = ''        /* initialize it to a blank */
  695.  
  696. call SysCls
  697. say ''
  698. say 'YARN DIRECTORY SCREEN'
  699. say '(Directory where most of the YARN programs are kept)'
  700. say ''
  701.  
  702. yarn = value('yarn', , 'OS2ENVIRONMENT')
  703. yarn = translate(yarn)
  704. yarn_exe = yarn || '\' || yarn_exe
  705. if yarn = '' then
  706.    do
  707.       say ''
  708.       say 'Unable to find YARN as an OS/2 environment variable.'
  709.       say 'That means you did not include a SET YARN statement in'
  710.       say 'config.sys or you did not reboot after modifying config.sys,'
  711.       say 'neither of which is a problem since you will be able to'
  712.       say 'enter the path for your YARN directory now.'
  713.       say ''
  714.    end
  715. if stream(yarn_exe, 'c', 'query exists') \= '' then
  716.    do
  717.       say ''
  718.       say 'We found' yarn 'as a possible YARN directory.'
  719.       say ''
  720.       say 'You may have set up Yarn with more than one YARN'
  721.       say 'directory or this  a temporary directory'
  722.       say 'you used to install YARN.'
  723.       say ''
  724.       say 'To accept   ' yarn '   as the YARN directory press ENTER,'
  725.       say 'or key in the full path of the YARN directory you wish'
  726.       prompt = 'to do this installation for:'
  727.          say prompt
  728.          parse value SysCurPos() with row col
  729.          row  = row - 1
  730.          col = length(prompt) + 2
  731.          call SysCurPos row, col
  732.       pull entry
  733.    end 
  734. if entry \= '' then yarn = entry
  735. yarn = strip(yarn, 'B')
  736. yarn_exe = filespec('name', yarn_exe)        /* get back to name only */
  737. yarn_exe = yarn || '\' || yarn_exe        /* reconstruct fully qualified path */
  738.  
  739. do forever
  740.    if stream(yarn_exe, 'c', 'query exists') \= '' then
  741.       do
  742.          leave
  743.       end
  744.          say ''
  745.          say 'Unable to find' yarn_exe '(YARN dir is in error or undefined)'
  746.          say ''
  747.          if yarn \= '' then
  748.             do
  749.                say translate(yarn) 'as YARN directory is in error'
  750.             end
  751.          prompt = 'Enter correct YARN directory path now:'
  752.          say prompt
  753.         parse value SysCurPos() with row col
  754.         row  = row - 1
  755.         col = length(prompt) + 2
  756.         call SysCurPos row, col
  757.         pull entry
  758.         entry = strip(entry, 'T', '\')        /* strip any trailing \ if entered */
  759.         yarn = entry
  760.         yarn_exe = filespec('name', yarn_exe)        /* get back to name only */
  761.         yarn_exe = yarn || '\' || yarn_exe        /* this is what we look for */
  762. end
  763.  
  764. yarn_exe = yarn || '\' || yarn_exe        /* this is what we look for */  
  765. yarn_exe = translate(yarn_exe)
  766. yarn_drive = filespec('drive', yarn_exe)
  767. yarn_drive = translate(yarn_drive)
  768. yarn_path = yarn || '\'
  769. home_path = home || '\'
  770. yarn_exe = filespec('name', yarn_exe)  /* OK, again get back to name only */
  771.  
  772. souper_exe = yarn_path || souper_exe
  773. vsoup_exe = yarn_path || vsoup_exe
  774. yarn_exe = yarn_path || yarn_exe
  775. import_exe = yarn_path || import_exe
  776. export_exe = yarn_path || export_exe
  777. expire_exe = yarn_path || expire_exe
  778. rebuild_exe = yarn_path || rebuild_exe
  779. go_exe = home_path || go_exe
  780. yarn_drive = filespec('drive', import_exe)
  781.  
  782. say ''
  783. say 'Installing for' yarn 'as the YARN directory.'
  784. say ''
  785. say ''
  786. say 'OK.  Press any key to continue'
  787. call SysGetKey 'NOECHO'
  788. if connection_type = 1 then say 'Password module loading...'
  789. RETURN
  790.  
  791. /*
  792. ==============================================
  793. get_dial_other_providers_app()
  794.  
  795. If you are making a PPP or SLIP connection using the
  796. Dial-Other-Internet-Providers utility, we will have your
  797. "application" (i.e., the setup you did for your provider
  798. in the tcpos2.ini file.  Here you can select which
  799. application you are installing for.  Be careful, there
  800. are "applications" here that are not related to a
  801. specific provider setup.
  802. ==============================================
  803. */
  804. get_dial_other_providers_app:
  805. arg inifile
  806. call SysCls
  807. say ''
  808. say 'DIAL-OTHER-INTERNET-PROVIDERS SCREEN'
  809. say ''
  810. result = SysIni(inifile, 'ALL:', 'apps')
  811. if result \= 'ERROR:' then
  812.    do j = 1 to apps.0
  813.       say j apps.j
  814.       if j \= 0 & j // 15 = 0 then
  815.          do
  816.         say '   There are more, press any key to continue'
  817.         say '   If one of these is the right one, remember the number!!!'
  818.         call SysGetKey 'NOECHO'
  819.          end
  820.    end
  821. say ''
  822. say '     Select the item above by number which'
  823. say '     is the Dial-Other-Internet-Provider application for'
  824. say '     this installation.'
  825. say ''
  826.  
  827. do until DataType(DOIP, 'W') & DOIP > 0 & DOIP < j
  828.    prompt = 'Selection:' 
  829.    say prompt
  830.       parse value SysCurPos() with row col
  831.       row  = row - 1
  832.       col = length(prompt) +2
  833.       call SysCurPos row, col
  834.    pull DOIP
  835.    if \DataType(DOIP, 'W') | DOIP <1 | DOIP > j-1 then
  836.    do
  837.       say 'Must be 1-' || j-1
  838.    end
  839. end
  840. say ''
  841. say 'Selected Application:' apps.DOIP
  842. say ''
  843. say ''
  844. say 'Press any key to continue'
  845. call SysGetKey 'NOECHO'
  846. say 'Please wait while parameters are being loaded...'
  847. RETURN apps.DOIP
  848.  
  849. /*
  850. ==============================================
  851. whose_zips_are_we_using()
  852.  
  853. You can select which kind of compression and
  854. uncompress utilities you use.  The os/2 InfoZip
  855. ports are recommended.
  856. ==============================================
  857. */
  858. whose_zips_are_we_using:
  859. /* Get path to zip files, also specify which we use */
  860. zip_type = 0
  861. call SysCls
  862.    say ''
  863.    say 'COMPRESSION/UNCOMPRESSION SCREEN'
  864.    say ''
  865.    say 'Select which type of compress and uncompress programs'
  866.    say 'you will use.  You must use them.  Recommended is the OS/2'
  867.    say 'port of InfoZip compression and uncompression programs.  You'
  868.    say 'can also select to use the MS-DOS PkWare programs.'
  869.    say ''
  870.    say 'Select from among:'
  871.    say '1  OS/2 InfoZip series (e.g., from zip201c2.zip and unz512x2.zip'
  872.    say '   archives, or later versions)'
  873.    say '2  MS-DOS PkWare (e.g., from the PKZ204G.ZIP archive)'
  874.    say '3  Any other type, whether OS/2 or MS-DOS based'
  875.    say '(ESC exits install program now)'
  876. do until pos(zip_type, '123') \= 0
  877.    prompt = 'Select 1, 2, or 3:'
  878.    say prompt
  879.    zip_type = SysGetKey('NOECHO')
  880.    select
  881.       when zip_type = Escape then signal goodbye
  882.       when zip_type = 1 then
  883.          do
  884.             say ''
  885.             file_msg1 = 'OS/2 InfoZip' /* This is the default */
  886.             say 'Selected: ' file_msg1
  887.             zip_exe = os2_zip_exe
  888.             zip_options = os2_zip_options
  889.             unzip_exe = os2_unzip_exe
  890.             unzip_options = os2_unzip_options
  891.          end
  892.       when zip_type = 2 then
  893.         do
  894.            say ''
  895.            file_msg1 = 'MS-DOS PkWare'
  896.            say 'Selected: ' file_msg1
  897.            zip_exe = msdos_zip_exe
  898.            zip_options = msdos_zip_options
  899.            unzip_exe = msdos_unzip_exe
  900.            unzip_options = msdos_unzip_options
  901.         end
  902.       when zip_type = 3 then
  903.         do
  904.            zip_exe = ''
  905.            unzip_exe = ''
  906.            say ''
  907.            say 'Selected: (OTHER)'
  908.            say 'You will need to edit the zip_exe and unzip_exe entries'
  909.            say 'in' ydparms_dat 'after installation is complete.'
  910.            say 'Refer to' yd_doc 'for help on how to customize for'
  911.            say 'other compression and uncompression utilities.'
  912.          end
  913.       when pos(zip_type, '123') = 0 then
  914.          do
  915.             say ''
  916.             say ''
  917.             say 'You may only enter 1,2 or 3 (or press ESC to quit)'
  918.             say ''
  919.          end
  920.       otherwise NOP
  921.    end
  922. end
  923. say ''
  924. say ''
  925. say 'Press any key to continue'
  926. call SysGetKey 'NOECHO'
  927. RETURN
  928.  
  929. /*
  930. =====================================      
  931. search_for_files()
  932.  
  933. We search for various files with calls to the
  934. file_locator() routine.  In the case of the zip and
  935. unzip files, we also attach their option strings.
  936. =====================================      
  937. */
  938.  
  939. search_for_files:
  940. /* The flag Abandon is returned = 1 if the file_locator() routine encounters a request to abort */
  941.  
  942. if zip_type \= 3 then
  943.    do
  944.       zip_exe = file_locator(zip_exe)
  945.       if Abandon then signal goodbye
  946.       unzip_exe = file_locator(unzip_exe)
  947.       if Abandon then signal goodbye
  948.       zip_exe = zip_exe zip_options
  949.       unzip_exe = unzip_exe unzip_options
  950.    end
  951.  
  952. if stream(alt_dialer_path || killjoy_exe, 'c', 'query exists') \= '' then
  953.    killjoy_exe = stream(alt_dialer_path || killjoy_exe, 'c', 'query exists')
  954.  
  955. say 'Patience...'  /* sometimes the next step takes a while to load */
  956. RETURN
  957.  
  958. /*
  959. =====================================================
  960. file_locator()
  961.  
  962. is a file finder that not only searches all available
  963. local drives for all instances found of that file, but
  964. provides a menu allowing you to select a single instance.
  965. If the filename being searched for has been fed to the
  966. routine with arguments or with a fully qualified path,
  967. the path and all arguments are stripped out so only
  968. the pure filename itself is searched.
  969.  
  970.  
  971. Syntax: file_locator(filename)
  972.  
  973. Returns the fully qualified path of the instance you
  974. select if at least one instance is found, or returns
  975. a blank ('') if none is found.  If only one instance
  976. is found, it is automatically selected (you get no
  977. menu, but you do get a 'found' notice).
  978.  
  979. =====================================================
  980. */
  981. file_locator:
  982. parse upper arg filename
  983.  
  984. escape = d2c(27)         /* escape character */
  985. file_spec = filespec('name', filename)
  986. call SysCls
  987. say ''
  988. say ''
  989. say ''
  990. say ''
  991. say 'Searching for' file_spec
  992. say ''
  993. say 'Search is restricted to local drives only.'
  994. say 'Remove media from local CD-ROM drives and other'
  995. say 'removable-media drives or we will search them, too.'
  996. say ''
  997.  
  998. map = SysDriveMap( , 'LOCAL')
  999. drives = words(map)
  1000. instances = 0
  1001. do i = 1 to drives
  1002.    drive.i = word(map, i)
  1003.    if SysDriveInfo(drive.i) = '' then iterate
  1004.    prompt = 'Searching' drive.i
  1005.    say prompt
  1006.       parse value SysCurPos() with row col
  1007.       row  = row - 1
  1008.       col = 0
  1009.       call SysCurPos row, col
  1010.    filsp = drive.i || '\' || file_spec        /* filespec with path */
  1011.    rc = SysFileTree(filsp, 'file', 'FS')
  1012.    do n = 1 to file.0
  1013.       instances = instances + 1        /* a counter */
  1014.       file_found.instances = file.n
  1015.    end
  1016. end
  1017.  
  1018. /*
  1019. ==================
  1020. If instances=0, that means we found no instance(s)
  1021. of the file.  Maybe the file name is changed.  Error
  1022. message.  But we continue the install because maybe
  1023. the filename can be corrected by editing YD_PARMS.DAT
  1024. when we are done
  1025. =================
  1026. */
  1027. if instances = 0 then
  1028.    do
  1029.       findfile_ErrNum = findfile_ErrNum +1
  1030.       call  beep 262, 200
  1031.       say ''
  1032.       say ''
  1033.       say 'MAJOR ERROR:  we found no instances of' file_spec || '.'
  1034.       say 'Maybe the file name has been changed.  We can'
  1035.       say 'continue, hoping the error can be corrected by'
  1036.       say 'editing the filename in the' ydparms_dat
  1037.       say 'file that we create in the specific HOME directory'
  1038.       say 'that we are now installing to.'
  1039.       say ''
  1040.       say 'Or you can Escape and correct now (recommended).'
  1041.       say ''
  1042.       
  1043. /* These next lines are for possible use in an error message
  1044. identifying this file which we can't find. */
  1045.  
  1046.       unfound_file.findfile_ErrNum = file_spec
  1047.       file_spec.instances = ''
  1048.       file_spec.instance_number = file_spec
  1049.  
  1050.       prompt = 'Escape quits YDINSTL.  Any other key continues'
  1051.       say prompt
  1052.          parse value SysCurPos() with row col
  1053.          row  = row - 1
  1054.          col = length(prompt) + 2
  1055.          call SysCurPos row, col
  1056.          if SysGetKey('NOECHO') = escape then Abandon = 1
  1057.    end
  1058.  
  1059. if instances > 1 | instances = 1 then        /* We list them all */
  1060.    do      
  1061.       say ''
  1062.       prompt = 'Found:  ' instances 'instance(s) of' file_spec
  1063.          parse value SysCurPos() with row col
  1064.          row  = row -1
  1065.          col = 0
  1066.          call SysCurPos row, col
  1067.       if instances > 1 then say prompt
  1068.       do i = 1 to instances
  1069.          parse var file_found.i date.i time.i size.i attrib.i file_spec.i
  1070.          date.i = right(date.i, 9)
  1071.          time.i = right(time.i, 7)
  1072.          size.i = right(size.i, 10)
  1073.          file_spec.i = strip(file_spec.i, 'B')
  1074.          if instances > 1 then say i date.i time.i size.i file_spec.i
  1075.          if i \= 0 & i // 15 = 0 & instances > 1 then
  1076.          do
  1077.         say '   There are more, press any key to continue'
  1078.         say '   If one of these is the right one, remember the number!!!'
  1079.         call SysGetKey 'NOECHO'
  1080.          end
  1081.       end       /* of Do i = 1 to instances */
  1082.    end        /* if instances > 1 | instances = 1 */
  1083.  
  1084. if instances > 1 then        /* We prompt for which one to select */
  1085.  
  1086.    do until DataType(instance_number,'W') &,
  1087.          instance_number < instances + 1,
  1088.          & instance_number > 0
  1089.       say 'Which is the correct one of these to use?'
  1090.       prompt = 'Enter 1-' || instances || ':' 
  1091.       say prompt
  1092.       parse value SysCurPos() with row col
  1093.          row  = row -1
  1094.          col = length(prompt) +2
  1095.          call SysCurPos row, col
  1096.       if instances > 1 then
  1097.          do
  1098.         pull instance_number
  1099.         if \DataType(instance_number, 'W') then
  1100.          do
  1101.         say 'Whole number only. Try Again.'
  1102.          end
  1103.         if instance_number > instances then
  1104.          do
  1105.         say 'Cannot exceed' instances || '.  Try again.'
  1106.          end
  1107.         if instance_number = 0 then
  1108.          do
  1109.         say 'Cannot enter zero.  Try again.'
  1110.          end
  1111.          end
  1112.    end
  1113.  
  1114. /* If only one instance, we do not need
  1115. to prompt or select the menu number because
  1116. instance_number is 1.  */
  1117.  
  1118. if instances = 1 then
  1119.    do
  1120.       instance_number = 1
  1121.       say 'Found and selected one instance:'
  1122.       say date.1 time.1 size.1 file_spec.1
  1123.    end
  1124.  
  1125. if instances > 1 then say 'Selected:  ' file_spec.instance_number
  1126.  
  1127. if instances = 1 | instances > 1 then
  1128.    do
  1129.       say ''
  1130.       say 'Press any key to continue'
  1131.       call SysGetKey 'NOECHO'
  1132.       say ''
  1133.    end
  1134. say ''
  1135. say ''
  1136. file_selected = file_spec.instance_number
  1137. RETURN file_selected
  1138.  
  1139. /*
  1140. ==============================================
  1141. get_parms_from_yarn_config()
  1142.  
  1143. Read the yarn config file.  Reconstitute lines that
  1144. have been continued on to the next line using
  1145. the \ continuation character, then pick out lines
  1146. with an = sign and that don't begin with the #
  1147. comment-out character.  Then set up the USER and
  1148. REPLY_PACKET variables.
  1149. ==============================================
  1150. */
  1151. get_parms_from_yarn_config:
  1152. n = 1
  1153. do while lines(yarn_config) > 0
  1154.     data_line = linein(yarn_config)
  1155.     line.n = data_line
  1156.     if pos('=', data_line) > 0 & \abbrev(line.n, '#') then
  1157.        do
  1158.         line.n = data_line
  1159.         if right(line.n, 1) = '\' then
  1160.          do until right(line.n, 1) \= '\'
  1161.         line_n_with_right_slash_stripped = strip(right(line.n,1), 'T', '\')
  1162.         next_data_line = linein(yarn_config)
  1163.         line.n = line_n_with_right_slash_stripped || next_data_line
  1164.          end
  1165.         n = n + 1
  1166.         number_of_reconstituted_lines = n
  1167.       end
  1168. end
  1169.  
  1170. j = 1
  1171. do until j = number_of_reconstituted_lines
  1172.    parse var line.j first.j '=' last.j
  1173.    do until first.j = stripped_F.j & last.j = stripped_L.j
  1174.       stripped_F.j = strip(first.j, 'B')
  1175.       first.j = strip(stripped_F.j, 'B', tab)
  1176.       stripped_L.j = strip(last.j, 'B')
  1177.       last.j = strip(stripped_L.j, 'B', tab)
  1178.    end
  1179.  
  1180.    select
  1181.       when abbrev(line.j, '#') then NOP
  1182.       when translate(first.j) = 'USER' then user = last.j
  1183.       when translate(first.j) = 'HOST' then host = last.j
  1184.       when translate(first.j) = 'REPLY-PACKET' then reply_packet = last.j
  1185.       otherwise NOP
  1186.    end
  1187.    j = j +1
  1188. end
  1189.  
  1190. LOGIN_ID = user
  1191. RETURN
  1192.  
  1193. /*
  1194. ==============================================
  1195. get_parms_from_advantis_dialerini()
  1196.  
  1197. Get selected parameters from dialer.ini (for the
  1198. IBM/IGN/Advantis IAK Dialer) for the application "user_user".
  1199. Example, my user ID is jlevy so for me user_user
  1200. is user_jlevy (all lower case) 
  1201. ==============================================
  1202. */
  1203. get_parms_from_advantis_dialerini:
  1204. /* Get parms from dialer.ini file.  The strip is of a final null character that for some reason gets fetched along with the parm */
  1205. user_user = 'user_' || user
  1206.    Upcase = xrange('A', 'Z')
  1207.    Lowcase = xrange('a', 'z')
  1208.    user_user = translate(user_user, Lowcase, Upcase) /* dialer.ini expects user_user to be all-lowercase */
  1209. account = strip(SysIni(dialer_ini, user_user, 'act'), 'T', X1)
  1210. DEFAULT_NEWS = strip(SysIni(dialer_ini, user_user, 'ns'), 'T', X1)
  1211. POPSRVR = strip(SysIni(dialer_ini, user_user, 'ps'), 'T', X1)
  1212. MAIL_GW = strip(SysIni(dialer_ini, user_user, 'sm'), 'T', X1)
  1213. connect_logfile = strip(SysIni(dialer_ini, 'AdvLog', 'Cfn'), 'T', X1)
  1214. ask = strip(SysIni(dialer_ini, user_user, 'ask'), 'T', X1)
  1215. DEFAULT_GOPHER = strip(SysIni(dialer_ini, user_user, 'gs'), 'T', X1)
  1216. DEFAULT_WWW = strip(SysIni(dialer_ini, user_user, 'ws'), 'T', X1)
  1217. DNS = strip(SysIni(dialer_ini, user_user, 'dn1'), 'T', X1)
  1218. DNS2 = strip(SysIni(dialer_ini, user_user, 'dn2'), 'T', X1)
  1219. is1 = strip(SysIni(dialer_ini, user_user, 'is1'), 'T', X1)
  1220. is2 = strip(SysIni(dialer_ini, user_user, 'is2'), 'T', X1)
  1221. rs1 = strip(SysIni(dialer_ini, user_user, 'rs1'), 'T', X1)
  1222. rs2 = strip(SysIni(dialer_ini, user_user, 'rs2'), 'T', X1)
  1223. fs1 = strip(SysIni(dialer_ini, user_user, 'fs1'), 'T', X1)
  1224. fs2 = strip(SysIni(dialer_ini, user_user, 'fs2'), 'T', X1)
  1225. DOMAIN_NAME = strip(SysIni(dialer_ini, user_user, 'md'), 'T', X1)
  1226. pin = strip(SysIni(dialer_ini, user_user, 'pin'), 'T', X1)
  1227. POP_ID = strip(SysIni(dialer_ini, user_user, 'emI'), 'T', X1)
  1228. RETURN
  1229.  
  1230. /*
  1231. ==============================================
  1232. get_parms_from_tcpos2ini()
  1233.  
  1234. Similarly, get the parameters (all of them) for the
  1235. Dial-Other-Internet-Providers "application" you had
  1236. selected when the GET_DIAL_OTHER_PROVIDERS_APP()
  1237. routine was run.
  1238.  
  1239. These are located in the TCPOS2.INI file.  Xi is the
  1240. null character.  It is returned with every value and
  1241. we strip it out
  1242. ==============================================
  1243. */
  1244. get_parms_from_tcpos2ini:
  1245. /* Get parms from tcpos2.ini file in the same way. */
  1246. PROVIDER = strip(SysIni(tcpos2_ini, host_app, 'PROVIDER'), 'T', X1)
  1247. LOGIN_ID = strip(SysIni(tcpos2_ini, host_app, 'LOGIN_ID'), 'T', X1)
  1248. PWD = strip(SysIni(tcpos2_ini, host_app, 'PWD'), 'T', X1)
  1249. SAVE_PWD = strip(SysIni(tcpos2_ini, host_app, 'SAVE_PWD'), 'T', X1)
  1250. PHONE_NUMBER = strip(SysIni(tcpos2_ini, host_app, 'PHONE_NUMBER'), 'T', X1)
  1251. HANGUP = strip(SysIni(tcpos2_ini, host_app, 'HANGUP'), 'T', X1)
  1252. SCRIPT = strip(SysIni(tcpos2_ini, host_app, 'SCRIPT'), 'T', X1)
  1253. SERVICE = strip(SysIni(tcpos2_ini, host_app, 'SERVICE'), 'T', X1)
  1254. YOURIP = strip(SysIni(tcpos2_ini, host_app, 'YOURIP'), 'T', X1)
  1255. DESTIP = strip(SysIni(tcpos2_ini, host_app, 'DESTIP'), 'T', X1)
  1256. NETMASK = strip(SysIni(tcpos2_ini, host_app, 'NETMASK'), 'T', X1)
  1257. MTU_SIZE = strip(SysIni(tcpos2_ini, host_app, 'MTU_SIZE'), 'T', X1)
  1258. VJ_COMP = strip(SysIni(tcpos2_ini, host_app, 'VJ_COMP'), 'T', X1)
  1259. PRIMARY_INF = strip(SysIni(tcpos2_ini, host_app, 'PRIMARY_INF'), 'T', X1)
  1260. HOSTNAME = strip(SysIni(tcpos2_ini, host_app, 'HOSTNAME'), 'T', X1)
  1261. DOMAIN_NAME = strip(SysIni(tcpos2_ini, host_app, 'DOMAIN_NAME'), 'T', X1)
  1262. DNS = strip(SysIni(tcpos2_ini, host_app, 'DNS'), 'T', X1)
  1263. DEFAULT_NEWS = strip(SysIni(tcpos2_ini, host_app, 'DEFAULT_NEWS'), 'T', X1)
  1264. DEFAULT_WWW = strip(SysIni(tcpos2_ini, host_app, 'DEFAULT_WWW'), 'T', X1)
  1265. DEFAULT_GOPHER = strip(SysIni(tcpos2_ini, host_app, 'DEFAULT_GOPHER'), 'T', X1)
  1266. MAIL_GW = strip(SysIni(tcpos2_ini, host_app, 'MAIL_GW'), 'T', X1)
  1267. POPSRVR = strip(SysIni(tcpos2_ini, host_app, 'POPSRVR'), 'T', X1)
  1268. REPLY_DOMAIN = strip(SysIni(tcpos2_ini, host_app, 'REPLY_DOMAIN'), 'T', X1)
  1269. REPLY_ID = strip(SysIni(tcpos2_ini, host_app, 'REPLY_ID'), 'T', X1)
  1270. POP_ID = strip(SysIni(tcpos2_ini, host_app, 'POP_ID'), 'T', X1)
  1271. POP_PWD = strip(SysIni(tcpos2_ini, host_app, 'POP_PWD'), 'T', X1)
  1272. MODEM_TYPE = strip(SysIni(tcpos2_ini, host_app, 'MODEM_TYPE'), 'T', X1)
  1273. COMPORT = strip(SysIni(tcpos2_ini, host_app, 'COMPORT'), 'T', X1)
  1274. BAUD = strip(SysIni(tcpos2_ini, host_app, 'BAUD'), 'T', X1)
  1275. DATABITS = strip(SysIni(tcpos2_ini, host_app, 'DATABITS'), 'T', X1)
  1276. PARITY = strip(SysIni(tcpos2_ini, host_app, 'PARITY'), 'T', X1)
  1277. DIAL_MODE = strip(SysIni(tcpos2_ini, host_app, 'DIAL_MODE'), 'T', X1)
  1278. PREFIX = strip(SysIni(tcpos2_ini, host_app, 'PREFIX'), 'T', X1)
  1279. PREFIX_ANS = strip(SysIni(tcpos2_ini, host_app, 'PREFIX_ANS'), 'T', X1)
  1280. INIT = strip(SysIni(tcpos2_ini, host_app, 'INIT'), 'T', X1)
  1281. INIT2 = strip(SysIni(tcpos2_ini, host_app, 'INIT2'), 'T', X1)
  1282. DISABLE = strip(SysIni(tcpos2_ini, host_app, 'DISABLE'), 'T', X1)
  1283. DISABLE_SEQ = strip(SysIni(tcpos2_ini, host_app, 'DISABLE_SEQ'), 'T', X1)
  1284. DIAL_PREFIX = strip(SysIni(tcpos2_ini, host_app, 'DIAL_PREFIX'), 'T', X1)
  1285. AUTOSTART = strip(SysIni(tcpos2_ini, host_app, 'AUTOSTART'), 'T', X1)
  1286. TOTAL_CONNECT = strip(SysIni(tcpos2_ini, host_app, 'TOTAL_CONNECT'), 'T', X1)
  1287.  
  1288. service = translate(service)
  1289.  
  1290. /* If no DNS2 is available, set DNS2 = DNS */
  1291. DNS = strip(DNS, 'B')
  1292. DNS = strip(DNS, 'B', tab)
  1293. if DNS2 = '' then DNS2 = DNS
  1294.  
  1295. if (popsrvr = '' | mail_gw = '' | default_news = '' | pop_id = '' | pop_pwd = ''),
  1296.     & piggyback then
  1297.    do
  1298.       call SysCls
  1299.       say 'WARNING'
  1300.       say 'You are attempting to install YARNDIAL for the' alt_dialer 'dialer'
  1301.       say 'and piggybacking parameters from a previous' host_app 'entry in'
  1302.       say 'SLIPPM (the Dial-Other-internet-Providers utility).'
  1303.       say ''
  1304.       say 'The following fields in the setup notebook MUST be filled in'
  1305.       say 'for the' host_app 'entry: POP Mail Server, POP Login ID,'
  1306.       say 'POP Password, News Server, and Mail Gateway'
  1307.       say ''
  1308.       say 'The following field or fields are blank:'
  1309.       if popsrvr = '' then say '   POP Mail Server'
  1310.       if mail_gw = '' then say '   Mail Gateway (SMTP Server)' 
  1311.       if default_news = '' then say '   News Server'
  1312.       if pop_id = '' then say '   POP Login ID'
  1313.       if pop_pwd = '' then say '   POP Password'
  1314.       say 'We will exit YDINSTL without completing the installation.'
  1315.       say 'Edit the appropriate fields in your SLIPPM setup for' host_app || '.'
  1316.       say 'In the unlikely event you have omitted one of these fields'
  1317.       say 'intentionally, e.g., because you won''t be using a news server,'
  1318.       say 'enter something.  Entering xxx or the word none will do fine.'
  1319.       say ''
  1320.       prompt = 'Press any key to continue (exits you).'
  1321.       say prompt
  1322.       parse value SysCurPos() with row col
  1323.       row  = row - 1
  1324.       col = length(prompt) + 2
  1325.       call SysCurPos row, col
  1326.       call SysGetKey 'NOECHO'
  1327.       signal goodbye
  1328.    end
  1329.  
  1330.  
  1331. RETURN
  1332.  
  1333.  
  1334. /*
  1335. ==============================================
  1336. get_alt_dialer_exe()
  1337.  
  1338. Prompt for this and verify
  1339. ==============================================
  1340. */
  1341.  
  1342. get_alt_dialer_exe:
  1343.  
  1344. call SysCls
  1345. say ''
  1346. say 'THIS IS THE "IDENTIFY-YOUR-DIALER" SCREEN'
  1347. say ''
  1348. do until pos(dialer_selection, '1239') \= 0
  1349.    say 'Select:'
  1350.    say '1  SLIPPM (IBM''s Dial-Other-Internet-Providers Utility)'
  1351.    say '2  The ILINK/2 Dialer'
  1352.    say '3  The IN-JOY Dialer'
  1353.    say '4-8 (Reserved for future use)'
  1354.    say '9  Not listed and not a SLIP.EXE or PPP.EXE dialup string,'
  1355.    say '     so prompt me to enter the dialer filename'
  1356.  
  1357.    say ''
  1358.    prompt = 'Enter 1-3 or 9:'
  1359.    say ''
  1360.    say prompt
  1361.       parse value SysCurPos() with row col
  1362.       row  = row - 1
  1363.       col = length(prompt) + 2
  1364.       call SysCurPos row, col
  1365.    dialer_selection = SysGetKey('ECHO')
  1366.    say ''
  1367.    if dialer_selection = 1 then
  1368.       do
  1369.          piggyback = 1  /* get parms from tcpos2.ini */
  1370.          say 'Selected:  SLIPPM Dialer'
  1371.          alt_dialer_exe = SLIPPM_EXE
  1372.          alt_dialer_name = 'SLIPPM'
  1373.          alt_dialer = 'SLIPPM'
  1374.          say ''
  1375.          say 'Press any key to continue'
  1376.          call SysGetKey 'NOECHO'
  1377.       end
  1378.  
  1379.    if dialer_selection = 2 then
  1380.       do
  1381.          piggyback = 1  /* get parms from tcpos2.ini */
  1382.          say 'Selected:  ILINK/2 Dialer'
  1383.          alt_dialer_exe = ILINK2_EXE
  1384.          say ''
  1385.          say 'Press any key to continue'
  1386.          call SysGetKey 'NOECHO'
  1387.          call locate_alt_dialer_exe
  1388.       end
  1389.    if dialer_selection = 3 then
  1390.       do
  1391.          say 'Selected:  IN-JOY Dialer'
  1392.          alt_dialer_exe = INJOY_EXE
  1393.          say ''
  1394.          say 'Press any key to continue'
  1395.          call SysGetKey 'NOECHO'
  1396.          call locate_alt_dialer_exe
  1397.       end
  1398.  
  1399.    if pos(dialer_selection, '1239') = 0 then
  1400.       say 'Must enter 1-3 or 9.  Try again'
  1401.    say ''
  1402. end
  1403.  
  1404. if dialer_selection = 9 then
  1405.    do
  1406.       say ''
  1407.       say 'You chose to enter the dialer name.'
  1408.       alt_dialer_exe = ''
  1409.       say 'Enter the name of your dialer executable,'
  1410.       say 'complete with filetype.  Omit path.'
  1411.       say 'Examples: slippm.exe, ilink2.exe, in-joy.exe, etc.'
  1412.       say ''
  1413.       info_entered = ''
  1414.       match_info_entered = ''
  1415.       prompt = 'Dialer filename with extension (no path):'
  1416.       call prompt_for_info
  1417.       alt_dialer_exe = info_entered
  1418.       say 'Dialer is' alt_dialer_exe
  1419.       say ''
  1420.       say 'Press any key to continue'
  1421.       call SysGetKey 'NOECHO'
  1422.       call locate_alt_dialer_exe
  1423.    end
  1424. RETURN
  1425.  
  1426. /*
  1427. ==================
  1428. locate_alt_dialer_exe()
  1429.  
  1430. Find the alt_dialer_exe, and from that fully qualified path
  1431. to it get drive, path, filename stripped of file and path,
  1432. and file part of file.exe
  1433. ==================
  1434. */
  1435.  
  1436. locate_alt_dialer_exe:
  1437. alt_dialer_exe = file_locator(alt_dialer_exe)
  1438.    if Abandon then signal goodbye
  1439.  
  1440. /* Strip any path or options and get the file part of alt_dialer_exe */
  1441. alt_dialer_exe = translate(alt_dialer_exe)
  1442. parse var alt_dialer_exe alt_dialer_name alt_dialer_options
  1443. alt_dialer_name = filespec('name', alt_dialer_name)
  1444. parse var alt_dialer_name alt_dialer '.' ext
  1445.  
  1446. /* Get the drive and path to alt_dialer_exe */
  1447. alt_dialer_drive = filespec('drive', alt_dialer_exe)
  1448. alt_dialer_path = alt_dialer_drive || filespec('path', alt_dialer_exe)
  1449. alt_dialer_dir = strip(alt_dialer_path, 'T', '\') /* path minus final '\' */
  1450. RETURN
  1451.  
  1452. /*
  1453. ==============================================
  1454. get_userID()
  1455.  
  1456. Prompt for this and verify
  1457. ==============================================
  1458. */
  1459.  
  1460. get_userID:
  1461.  
  1462. call SysCls
  1463. say ''
  1464. say 'MAIL AND NEWS USER ID SCREEN'
  1465. say ''
  1466. say 'Enter UserID part of your e-mail address'
  1467. say 'Example: if your e-mail address is jsmith@goodnet.net'
  1468. say 'then your UserID is jsmith'
  1469. say ''
  1470. info_entered = ''
  1471. match_info_entered = ''
  1472. prompt = 'Enter userID:'
  1473. call prompt_for_info
  1474. POP_ID = info_entered
  1475. say 'userID is' POP_ID
  1476. say ''
  1477. say 'Press any key to continue'
  1478. call SysGetKey 'NOECHO'
  1479. RETURN
  1480.  
  1481. /*
  1482. ==============================================
  1483. get_domain()
  1484.  
  1485. Prompt for this and verify
  1486. ==============================================
  1487. */
  1488.  
  1489. get_domain:
  1490.  
  1491. call SysCls
  1492. say ''
  1493. say 'MAIL AND NEWS DOMAIN SCREEN'
  1494. say ''
  1495. say 'Enter Domain part of your e-mail address'
  1496. say 'Example: if your e-mail address is jsmith@goodnet.net'
  1497. say 'then your Domain is goodnet.net'
  1498. say ''
  1499. info_entered = ''
  1500. match_info_entered = ''
  1501. prompt = 'Enter domain name:'
  1502. call prompt_for_info
  1503. domain_name = info_entered
  1504. say 'domain name is' domain_name
  1505. say ''
  1506. say 'Press any key to continue'
  1507. call SysGetKey 'NOECHO'
  1508. RETURN
  1509.  
  1510.  
  1511. /*
  1512. ==============================================
  1513. get_nameservers()
  1514.  
  1515. Prompt for primary and alternate and verify
  1516. ==============================================
  1517. */
  1518.  
  1519. get_nameservers:
  1520.  
  1521. /* get primary nameserver address */
  1522.  
  1523. call SysCls
  1524. say ''
  1525. say 'NAMESERVER SCREENS (primary and alternate)'
  1526. say ''
  1527. say 'Enter primary nameserver address in Decimal Dot'
  1528. say 'notation.    Example: 150.203.23.247'
  1529. say ''
  1530. info_entered = ''
  1531. match_info_entered = ''
  1532. prompt = 'Enter primary nameserver address:'
  1533. call prompt_for_info
  1534. DNS = info_entered
  1535. say 'Primary nameserver is' DNS
  1536. say ''
  1537. say 'Press any key to continue'
  1538. call SysGetKey 'NOECHO'
  1539.  
  1540. /* Now get alternate nameserver address */
  1541.  
  1542. say ''
  1543. say ''
  1544. say ''
  1545. say 'Now enter alternate nameserver address in Decimal Dot'
  1546. say 'notation.    Example: 150.203.23.247'
  1547. say 'If you do not have an alternate, press ENTER twice'
  1548. say 'to bypass this screen, or enter primary again.'
  1549. say ''
  1550. info_entered = ''
  1551. match_info_entered = ''
  1552. prompt = 'Enter alternate nameserver address:'
  1553. DNS2 = info_entered
  1554. say 'Alternate nameserver is' DNS2
  1555. say ''
  1556. say 'Press any key to continue'
  1557. call SysGetKey 'NOECHO'
  1558.  
  1559. /* If no alternate nameserver was entered, set DNS2 = DNS */
  1560. DNS = strip(DNS, 'B')
  1561. DNS = strip(DNS, 'B', tab)
  1562. DNS2 = strip(DNS2, 'B')
  1563. DNS2 = strip(DNS2, 'B', tab)
  1564. if DNS2 = '' then DNS2 = DNS
  1565. RETURN
  1566.  
  1567.  
  1568. /*
  1569. ==============================================
  1570. get_pop3mail_server()
  1571.  
  1572. Prompt for this and verify
  1573. ==============================================
  1574. */
  1575.  
  1576. get_pop3mail_server:
  1577.  
  1578. call SysCls
  1579. say ''
  1580. say 'POP3 SERVER (Mail Server) SCREEN'
  1581. say ''
  1582. say 'Example: pop01.us.ny.ibm.net'
  1583. say ''
  1584. info_entered = ''
  1585. match_info_entered = ''
  1586. prompt = 'Enter POP3 server:'
  1587. call prompt_for_info
  1588. popsrvr = info_entered
  1589. say 'POP3 Server is' popsrvr
  1590. say ''
  1591. say 'Press any key to continue'
  1592. call SysGetKey 'NOECHO'
  1593. RETURN
  1594.  
  1595.  
  1596. /*
  1597. ==============================================
  1598. call get_smtp_server()
  1599.  
  1600. Prompt for this and verify
  1601. ==============================================
  1602. */
  1603.  
  1604. get_smtp_server:
  1605.  
  1606. call SysCls
  1607. say ''
  1608. say 'SMTP MAIL GATEWAY (Mail Server) SCREEN'
  1609. say ''
  1610. say 'Example: smtp.gw-01.ny.us.ibm.net'
  1611. say ''
  1612. info_entered = ''
  1613. match_info_entered = ''
  1614. prompt = 'Enter SMTP server:'
  1615. call prompt_for_info
  1616. mail_gw = info_entered
  1617. say 'SMTP Server is' mail_gw
  1618. say ''
  1619. say 'Press any key to continue'
  1620. call SysGetKey 'NOECHO'
  1621. RETURN
  1622.  
  1623.  
  1624. /*
  1625. ==============================================
  1626. get_news_server()
  1627.  
  1628. Prompt for this and verify
  1629. ==============================================
  1630. */
  1631.  
  1632. get_news_server:
  1633.  
  1634. call SysCls
  1635. say ''
  1636. say 'NEWS SERVER (NNTP Server) SCREEN'
  1637. say ''
  1638. say 'Example: news01.us.ny.ibm.net'
  1639. say ''
  1640. info_entered = ''
  1641. match_info_entered = ''
  1642. prompt = 'Enter NNTP server:'
  1643. call prompt_for_info
  1644. default_news = info_entered
  1645. say 'News Server is' default_news
  1646. say ''
  1647. say 'Press any key to continue'
  1648. call SysGetKey 'NOECHO'
  1649. RETURN
  1650.  
  1651. /*
  1652. ==============================================
  1653. get_login_id()
  1654.  
  1655. Prompt for this and verify
  1656. ==============================================
  1657. */
  1658.  
  1659. get_login_id:
  1660.  
  1661. call SysCls
  1662. say ''
  1663. say 'LOGIN_ID FOR LOGGING INTO PROVIDER'
  1664. say ''
  1665. say 'This is the ID you use when you login to your provider.'
  1666. say 'It may or may not be the same as your POP3 Mail user ID.'
  1667. say ''
  1668. info_entered = ''
  1669. match_info_entered = ''
  1670. prompt = 'Enter LOGIN_ID:'
  1671. call prompt_for_info
  1672. login_id = info_entered
  1673. say 'LOGIN_ID is' login_id
  1674. say ''
  1675. say 'Press any key to continue'
  1676. call SysGetKey 'NOECHO'
  1677. RETURN
  1678.  
  1679. /*
  1680. ==============================================
  1681. get_dialer_app()
  1682.  
  1683. Prompt for this and verify
  1684. ==============================================
  1685. */
  1686.  
  1687. get_dialer_app:
  1688.  
  1689. call SysCls
  1690. say ''
  1691. say 'DIALER HOST NAME'
  1692. say ''
  1693. say 'This is the name you used for the entry name when you'
  1694. say 'configured the dialer to your host provider.'
  1695. say 'It is Name in a command line of the type shown below'
  1696. say '(where slippm.exe is the dialer in this particular example)'
  1697. say '     SLIPPM.EXE Name'
  1698. say 'This should start up your dialer, connecting to the correct'
  1699. say 'host.'
  1700. say ''
  1701. say 'You can test the validity of ''Name'' by entering this'
  1702. say 'command in an OS/2 window, after changing to the directory'
  1703. say 'where your dialer .EXE resides.  It should connect you.'
  1704. say ''
  1705. say 'You may need to reproduce exactly whatever combination of'
  1706. say 'combination ofUpper/Lower case letters you used to define'
  1707. say 'the Name of the dialer entry'
  1708. say ''
  1709. info_entered = ''
  1710. match_info_entered = ''
  1711. prompt = 'Name you used as dialer entry:'
  1712. call prompt_for_info
  1713. host_app = info_entered
  1714. say 'Dialer name for entry is' host_app
  1715. say ''
  1716. say 'Press any key to continue'
  1717. call SysGetKey 'NOECHO'
  1718. RETURN
  1719.  
  1720. /*
  1721. =================
  1722. get_comport()
  1723. =================
  1724. */
  1725. get_comport:
  1726. call SysCls
  1727. say ''
  1728. say 'COM PORT'
  1729. say ''
  1730. say 'Enter COM port used by this installation'
  1731. say 'Enter as COM1, COM2, etc.'
  1732. say 'There should be NO space between COM and the port number'
  1733. say ''
  1734. info_entered = ''
  1735. match_info_entered = ''
  1736. prompt = 'Enter:'
  1737. call prompt_for_info
  1738. comport = info_entered
  1739. comport = translate(comport)
  1740. say 'COM port entered is' comport
  1741. say ''
  1742. say 'Press any key to continue'
  1743. call SysGetKey 'NOECHO'
  1744. RETURN
  1745.  
  1746. /*
  1747. ==============================================
  1748. set_interf_removal()
  1749.  
  1750. Set the interface_removal assignment.
  1751.  
  1752. Prompt for this and verify
  1753. ==============================================
  1754. */
  1755.  
  1756. set_interf_removal:
  1757.  
  1758. call SysCls
  1759. say ''
  1760. say 'INTERFACE REMOVAL:'
  1761. say ''
  1762. say 'Sometimes, when shutting down the dialer and after disconnecting,'
  1763. say 'a phantom router interface that should have been removed is left up.'
  1764. say 'This may interfere with subsequent communication programs until'
  1765. say 'a reboot is done.'
  1766. say ''
  1767. say 'For most installations, select 2.  Change to 0 if you have problems.'
  1768. say 'Select:'
  1769. say '0  (Zero) Don''t try to remove them.'
  1770. say '1  Remove interfaces only when left up by IN-JOY dialer'
  1771. say '2  Remove interfaces remaining when YarnDial is over and'
  1772. say '   we are disconnected.'
  1773. say '   (2 is recommended, unless you regularly establish simultaneous'
  1774. say '   connections with two or more modems; in that case try 0)'
  1775. say ''
  1776. do until pos(interface_removal, '012') \= 0
  1777.    prompt = 'Enter 0, 1, or 2:'
  1778.    say ''
  1779.    say prompt
  1780.       parse value SysCurPos() with row col
  1781.       row  = row - 1
  1782.       col = length(prompt) + 2
  1783.       call SysCurPos row, col
  1784.    interface_removal = SysGetKey('NOECHO')
  1785.    say ''
  1786.    if interface_removal = 0 then
  1787.       say 'Selected: not to remove interfaces if left up'
  1788.    if interface_removal = 1 then
  1789.       say 'Selected: remove interfaces only when left up by IN-JOY dialer'
  1790.    if interface_removal = 2 then
  1791.       say 'Selected: remove all suspected phantom interfaces.'
  1792.    if pos(interface_removal, '012') = 0 then say 'Incorrect.  Try again.'
  1793. end
  1794. say ''
  1795. say 'Press any key to continue'
  1796. call SysGetKey('NOECHO')
  1797.  
  1798. RETURN
  1799.  
  1800. /*
  1801. ==============================================
  1802. get_shell_windowsize()
  1803.  
  1804. This is the size of the maximized window when YRNSHELL.CMD runs.
  1805.  
  1806. Prompt for this and verify
  1807. ==============================================
  1808. */
  1809.  
  1810. get_shell_windowsize:
  1811.  
  1812. call SysCls
  1813. say ''
  1814. say 'YARN SHELL WINDOW SIZE:'
  1815. say ''
  1816. say 'This installer creates a utility to run YARN, called' yarnshell_cmd
  1817. say 'You can choose to have a larger-than-normal window size when'
  1818. say yarnshell_cmd 'runs and the window is maximized.'
  1819. say 'Select:'
  1820. say '1  80 chars wide x 24 lines (this is a normal OS/2 window)'
  1821. say '2  80 chars wide x 40 lines (recommended)'
  1822. say '3  90 chars wide x 40 lines'
  1823. say ''
  1824. do until pos(size, '123') \= 0
  1825.    prompt = 'Enter 1, 2 or 3:'
  1826.    say ''
  1827.    say prompt
  1828.       parse value SysCurPos() with row col
  1829.       row  = row - 1
  1830.       col = length(prompt) + 2
  1831.       call SysCurPos row, col
  1832.    size = SysGetKey('NOECHO')
  1833.    say ''
  1834.    if size = 1 then
  1835.       do
  1836.          say 'You have selected 80 chars x 24 lines'
  1837.          conmode = 'mode co80,24'
  1838.       end
  1839.    if size = 2 then
  1840.       do
  1841.          say 'You have selected 80 chars x 40 lines'
  1842.          conmode = 'mode co90,40'
  1843.       end
  1844.    if size = 3 then
  1845.       do
  1846.          say 'You have selected 90 chars x 40 lines'
  1847.          conmode = 'mode co90,40'
  1848.       end
  1849.    if pos(size, '123') = 0 then say 'Incorrect.  Try again.'
  1850. end
  1851. say''
  1852. say 'Press any key to continue'
  1853. call SysGetKey('NOECHO')
  1854.  
  1855. RETURN
  1856.  
  1857.  
  1858. /*
  1859. ==================
  1860. get_injoy_parms()
  1861.  
  1862. Dissect the IN-JOY HOSTS.DAT file getting
  1863.    configuration name
  1864.    numerical addresses of main and alternate nameservers
  1865.    login ID
  1866.    domain name
  1867.    comport
  1868. ==================
  1869. */
  1870.  
  1871. get_injoy_parms:
  1872. /* locate the IN-JOY HOSTS.DAT file */
  1873. call SysCls
  1874. say ''
  1875. say 'Searching though IN-JOY''s' hosts_dat 'file for'
  1876. say 'dialing configurations...'
  1877. say '' 
  1878. if stream(alt_dialer_path || hosts_dat, 'c', 'query exists') \= '' then
  1879.    hosts_dat = stream(alt_dialer_path || hosts_dat, 'c', 'query exists')
  1880. else
  1881.    do 
  1882.       say ''
  1883.       say 'ERROR: Cannot find IN-JOY''s HOSTS.DAT file in the directory'   
  1884.       say alt_dialer_dir 'where' injoy_exe 'was found.'
  1885.       say ''
  1886.       say 'Check that all IN-JOY files are together in one single directory'
  1887.       say 'and that you configured IN-JOY to connect to your Internet'
  1888.       say 'Service Provider.'
  1889.       say ''
  1890.       say 'This is not fatal (YD_PARMS.DAT can be edited).'
  1891.       other_err = 1
  1892.       ijparms_err1 = 1
  1893.       if ijparms_err1 = 1 then
  1894.          ijparms_errmsg1 = 'No IN-JOY HOSTS.DAT file found.'
  1895.       say 'Press any key to continue or Escape to exit'
  1896.       if SysGetKey('NOECHO') = Escape then signal goodbye
  1897.       signal exit_get_ijparms
  1898.    end
  1899. filesize1 = chars(hosts_dat)
  1900. if stream(alt_dialer_patrh || 'default.cfg', 'c', 'query exists') \= '' then
  1901.    filesize2 = chars(alt_dialer_path || 'default.cfg') - 10
  1902.    else filesize2 = 1167        /* a guess */ 
  1903. hosts = trunc((filesize1 / filesize2), 0)
  1904. dataunit = trunc((filesize1) / hosts)
  1905.  
  1906. call stream hosts_dat, 'c', 'open'
  1907. /*  The 'seek' stream command is different under Classic ReXX and Object ReXX
  1908. Object ReXX requires the use of the word read or write, whereas Classic Rexx does not */ 
  1909. call stream hosts_dat, 'c', 'open'
  1910. read_instr = ''
  1911. if left(rexx_type, 7) = os2Obj_Rexx then read_instr = 'read'
  1912.  
  1913. i = 1
  1914. do  hosts
  1915. /* offsets from start of HOSTS.DAT */
  1916.    offset = dataunit * (i - 1)
  1917.    cfgname_lenbyte = offset + 1
  1918.    cfgname_pos = offset + 3
  1919.    interfname_pos = offset + 71
  1920.    ns1_pos = offset + 126
  1921.    ns2_pos = offset + 142
  1922.    loginid_lenbyte = offset + 282
  1923.    loginid_pos = offset + 286
  1924.    domain_pos = offset + 419
  1925.    comport_pos = offset + 504
  1926.  
  1927. /* get the parameters */
  1928.    cfgname.i = get_hostsdat_Lparm(cfgname_lenbyte, cfgname_pos)
  1929.    interfname.i = get_hostsdat_0parm(interfname_pos)
  1930.    ns1.i = get_hostsdat_0parm(ns1_pos)
  1931.    ns2.i = get_hostsdat_0parm(ns2_pos)
  1932.    loginid.i = get_hostsdat_Lparm(loginid_lenbyte, loginid_pos)
  1933.    domain.i = get_hostsdat_0parm(domain_pos)
  1934.    comport.i = get_hostsdat_0parm(comport_pos)
  1935.  
  1936.    i = i + 1
  1937. end
  1938.  
  1939. call stream hosts_dat, 'c', 'close'
  1940.  
  1941. if i = 1 then
  1942.    do
  1943.       say 'ERROR:  found no IN-JOY dialing configurations'
  1944.       say 'Check if you set up one in IN-JOY and that all'
  1945.       say 'IN-JOY files are together in one single directory.'
  1946.       say ''
  1947.       say 'Another possibility is that IN-JOY HOSTS.DAT file'
  1948.       say 'format is different from the one in IN-JOY v 09'
  1949.       say 'used as model for retrieving IN-JOY parameters.'
  1950.       say 'Please e-mail jlevy@ibm.net (author of YARNDIAL)'
  1951.       say 'if assistance is needed.'
  1952.       say 'This is not fatal (YD_PARMS.DAT can be edited).'
  1953.       other_err = 1
  1954.       ijparms_err2 = 1
  1955.       if ijparms_err2 = 1 then
  1956.          ijparms_errmsg2 = 'No Dialer configurations found in IN-JOY''s HOSTS.DAT'
  1957.       say 'Press any key to continue or Escape to abort'
  1958.       if SysGetKey('NOECHO') = Escape then signal goodbye
  1959.       signal exit_get_ijparms
  1960.    end
  1961.  
  1962. if i = 2 then
  1963.    do
  1964.       say 'Found and selected the following dialing configuration:'
  1965.       say '   ' cfgname.1
  1966.       ij_app = 1
  1967.    end
  1968.  
  1969. if i > 2 then
  1970.    do
  1971.       say 'Found the following dialing configurations:'
  1972.          do j = 1 to i -1
  1973.             say j cfgname.j
  1974.             if j \= 0 & j // 15 = 0 then
  1975.               do
  1976.                  say '   There are more, press any key to continue'
  1977.                  say '   If one of these is the right one, remember the number!!!'
  1978.                  call SysGetKey 'NOECHO'
  1979.               end
  1980.          end
  1981.  
  1982.          say ''
  1983.          say '     Select the item above by number which is what you entered'
  1984.          say '     as the configuration name (i.e, HOST ID) when setting up'
  1985.          say '     IN-JOY to connect to your Internet Service Provider'
  1986.          say ''
  1987.             do until DataType(ij_app, 'W') & ij_app > 0 & ij_app < j
  1988.                prompt = 'Selection:' 
  1989.                say prompt
  1990.                parse value SysCurPos() with row col
  1991.                row  = row - 1
  1992.                col = length(prompt) +2
  1993.                call SysCurPos row, col
  1994.                pull ij_app
  1995.                if \DataType(ij_app, 'W') | ij_app <1 | ij_app > j-1 then
  1996.                say 'Must be 1-' || j-1
  1997.             end
  1998.             say ''
  1999.             say 'Selected' cfgname.ij_app 'as the IN-JOY Dialer host ID.'
  2000.    end /* DO if i > 2 */
  2001.  
  2002. say ''
  2003. say ''
  2004. say 'Press any key to continue'
  2005. call SysGetKey 'NOECHO'
  2006.  
  2007. host_app = cfgname.ij_app
  2008. interf_prefix = interfname.ij_app
  2009. DNS = ns1.ij_app
  2010. DNS2 = ns1.ij_app
  2011. login_id =loginid.ij_app
  2012. DOMAIN_NAME = domain.ij_app
  2013. COMPORT = comport.ij_app
  2014.  
  2015. exit_get_ijparms:
  2016. RETURN cfgname.ij_app
  2017.  
  2018. /*
  2019. ================
  2020. get_hostsdat_Lparm()
  2021. get_hostsdat_0parm()
  2022.  
  2023. Both called by get_injoy_parms()
  2024. These extract parameters from the IN-JOY hosts.dat
  2025. file.
  2026.  
  2027. get_hostsdat_Lparm() is used where
  2028. there is a length byte available.  Input arguments are
  2029. offsets from beginning of file as follows:
  2030.         lenpos        location of length byte
  2031.         parmpos        location of parameter         
  2032.  
  2033. get_hostsdat_0parm() is used where
  2034. there is no length byte available and where the parameter
  2035. is null-delimited.  Sole input argument is offset from beginning
  2036. of file for:
  2037.         parmpos        location of parameter 
  2038. =================
  2039. */
  2040. get_hostsdat_Lparm:
  2041. arg lenpos, parmpos
  2042. call stream hosts_dat, 'c', 'seek =' || lenpos read_instr        /* position to length byte */
  2043. parm_length = c2d(charin(hosts_dat))        /* get length */
  2044. call stream hosts_dat, 'c', 'seek =' || parmpos read_instr        /* position to parm */
  2045. parameter = ''
  2046. do parm_length        /* build the parm */
  2047.    char = charin(hosts_dat)
  2048.    parameter = parameter || char
  2049. end
  2050. RETURN parameter
  2051.  
  2052. get_hostsdat_0parm:
  2053. arg parmpos
  2054. call stream hosts_dat, 'c', 'seek =' || parmpos read_instr
  2055. parameter = ''
  2056. do until c2d(char) = 0
  2057.    char = charin(hosts_dat)
  2058.    if c2d(char) \= 0 then parameter = parameter || char
  2059. end
  2060. RETURN parameter
  2061.  
  2062.  
  2063. /*
  2064. ==============================================
  2065. get_interface_prefix()
  2066.  
  2067. Prompt for this and verify
  2068. ==============================================
  2069. */
  2070.  
  2071. get_interface_prefix:
  2072.  
  2073. call SysCls
  2074. say ''
  2075. say 'INTERFACE PREFIX SCREEN'
  2076. say ''
  2077. do until pos(dialer_selection, '1239') \= 0
  2078.    say 'Select (normally select 1 for an IN-JOY ppp connection'
  2079.    say '  or 3 for an IN-JOY slip connection):'
  2080.    say '1  PPP or ppp'
  2081.    say '2  SL or sl'
  2082.    say '3  SLIP or slip'
  2083.    say '4-8 (Reserved for future use)'
  2084.    say '9  Not listed so prompt me'
  2085.  
  2086.    say ''
  2087.    prompt = 'Enter 1-3 or 9:'
  2088.    say ''
  2089.    say prompt
  2090.       parse value SysCurPos() with row col
  2091.       row  = row - 1
  2092.       col = length(prompt) + 2
  2093.       call SysCurPos row, col
  2094.    interf_prefix = SysGetKey('ECHO')
  2095.    say ''
  2096.  
  2097.    select
  2098.       when interf_prefix = 1 then
  2099.          do
  2100.         say 'Selected:  PPP or ppp'
  2101.         interf_prefix = 'PPP'
  2102.          end
  2103.       when interf_prefix = 2 then
  2104.          do
  2105.         say 'Selected:  SL (regardless of case)'
  2106.         interf_prefix = 'SL'
  2107.          end
  2108.       when interf_prefix = 3 then
  2109.          do
  2110.         say 'Selected:  SLIP or slip'
  2111.         interf_prefix = 'SLIP'
  2112.          end
  2113.       when interf_prefix = 9 then
  2114.          do
  2115.         say 'You chose to enter the prefix'
  2116.          end
  2117.       when pos(interf_prefix, '1239') = 0 then
  2118.          say 'Must enter 1-3 or 9.  Try again'
  2119.    end         /* of Select */
  2120.    say ''
  2121. end        /* of Do Until */
  2122. say ''
  2123. say 'Press any key to continue'
  2124. call SysGetKey 'NOECHO'
  2125.  
  2126. if interf_prefix = 9 then
  2127.    do
  2128.       parse value SysCurPos() with row col
  2129.       row  = row - 1
  2130.       col = 0
  2131.       call SysCurPos row, col
  2132.  
  2133.       say 'Enter a prefix.  Maximum 5 characters.'
  2134.       say 'Letters preferred, though anything will work.  Read YD.DOC for info.'
  2135.       say 'Examples: ppp, sl, lan'
  2136.       say ''
  2137.       info_entered = ''
  2138.       match_info_entered = ''
  2139.       prompt = 'Prefix:'
  2140.       call prompt_for_info
  2141.       interf_prefix = info_entered
  2142.       interf_prefix = left(interf_prefix, 5)
  2143.       say 'Prefix is' interf_prefix
  2144.       say ''
  2145.       say 'Press any key to continue'
  2146.       call SysGetKey 'NOECHO'
  2147.    end
  2148. RETURN
  2149.  
  2150. /*
  2151. ==============
  2152. prompt_for_info()
  2153.  
  2154. Makes you enter it twice to verify
  2155. ==============
  2156. */
  2157. prompt_for_info:
  2158. do until match_info_entered = info_entered
  2159.    say prompt
  2160.       parse value SysCurPos() with row col
  2161.       row  = row - 1
  2162.       col = length(prompt) + 2
  2163.       call SysCurPos row, col
  2164.       parse pull info_entered
  2165.    if info_entered = '' then info_entered = '(nothing entered)'
  2166.    say ''
  2167.    prompt = 'Enter it again to verify:'
  2168.    say prompt
  2169.       parse value SysCurPos() with row col
  2170.       row  = row - 1
  2171.       col = length(prompt) + 2
  2172.       call SysCurPos row, col
  2173.       parse pull match_info_entered
  2174.    if match_info_entered = '' then match_info_entered = '(nothing entered)'
  2175.    if match_info_entered \== info_entered then
  2176.       do
  2177.          say ''
  2178.          say match_info_entered 'does not match' info_entered
  2179.          say 'Try again'
  2180.       end
  2181. end
  2182. RETURN info_entered
  2183.  
  2184.  
  2185. /*
  2186. =========================
  2187. are_we_SLIP_or_PPP()
  2188.  
  2189. Which are we?
  2190. =========================
  2191. */
  2192. are_we_SLIP_or_PPP:
  2193. do until pos(serv, 'SP') \= 0
  2194.    call SysCls
  2195.    say ''
  2196.    say 'SLIP OR PPP?'
  2197.    say ''
  2198.    say 'Will this be a SLIP or PPP connection?'
  2199.    prompt = 'Enter S or P:'
  2200.    say ''
  2201.    say prompt
  2202.       parse value SysCurPos() with row col
  2203.       row  = row - 1
  2204.       col = length(prompt) + 2
  2205.       call SysCurPos row, col
  2206.    serv = translate(SysGetKey('ECHO'))
  2207.    say ''
  2208.    if serv = 'S' then
  2209.       do
  2210.          say 'Selected:  SLIP'
  2211.          service = 'SLIP'
  2212.       end
  2213.    if serv = 'P' then
  2214.       do
  2215.          say 'Selected: PPP'
  2216.          service = 'PPP'
  2217.       end
  2218.    if pos(serv, 'SP') = 0 then say 'Must enter either S or P.  Try again'
  2219.    say ''
  2220. end
  2221. say ''
  2222. say 'Press any key to continue'
  2223. call SysGetKey 'NOECHO'
  2224. RETURN
  2225.  
  2226. /*
  2227. =========================
  2228. are_we_using_souper_or_vsoup()
  2229.  
  2230. Which?
  2231. =========================
  2232. */
  2233. are_we_using_souper_or_vsoup:
  2234. do until pos(souptype, '12') \= 0
  2235.    call SysCls
  2236.    say ''
  2237.    say 'ARE WE USING SOUPER OR VSOUP?'
  2238.    say ''
  2239.    say 'Which are we using as the program to transfer mail and news from the'
  2240.    say 'POP3 and/or NNTP mail and news servers into SOUP packets, and to send'
  2241.    say 'mail and posts in SOUP reply packets?'
  2242.    say '    1  Souper (as Souper.exe)'
  2243.    say 'or  2  VSoup  (as VSoup.exe)'
  2244.    prompt = 'Enter 1 or 2:'
  2245.    say ''
  2246.    say prompt
  2247.       parse value SysCurPos() with row col
  2248.       row  = row - 1
  2249.       col = length(prompt) + 2
  2250.       call SysCurPos row, col
  2251.    souptype = translate(SysGetKey('ECHO'))
  2252.    say ''
  2253.    if souptype = 1 then
  2254.       do
  2255.          say 'Selected:  SOUPER'
  2256.          vsoup = 0
  2257.        end
  2258.    if souptype = '2' then
  2259.       do
  2260.          say 'Selected: VSOUP'
  2261.          vsoup = 1
  2262.       end
  2263.    if pos(souptype, '12') = 0 then say 'Must enter either 1 or 2.  Try again'
  2264.    say ''
  2265. end
  2266.  
  2267. select
  2268.    when stream(souper_exe, 'c', 'query exists') \= '',
  2269.      & stream(vsoup_exe, 'c', 'query exists') \= '' then
  2270.        /* means we found both in the yarn directory as expected
  2271.         (the xxxxx _exe names both have yarn dir as part of their filespecs) */
  2272.       do
  2273.          say ''
  2274.          say 'Press any key to continue'
  2275.          call SysGetKey 'NOECHO'
  2276.       end
  2277.    when stream(souper_exe, 'c', 'query exists') = '',
  2278.      & stream(vsoup_exe, 'c', 'query exists') \= '',
  2279.      & vsoup = 0 then        /* Found vsoup.exe there.  Did not find souper.exe. */
  2280.       do
  2281.          call beep 1000, 200
  2282.          say ''
  2283.          say ''
  2284.          say 'We did not find SOUPER.EXE in the' yarn 'directory.'
  2285.          say 'This is the program you elected to use to get/send mail and posts'
  2286.          say 'You can copy it to that directory now.  You do not have to exit'
  2287.          say 'this install program to do so. (Of course you copy it later, too.)'
  2288.          say ''
  2289.          say 'Press any key to continue'
  2290.          call SysGetKey 'NOECHO'
  2291.       end
  2292.    when stream(souper_exe, 'c', 'query exists') \= '',
  2293.      & stream(vsoup_exe, 'c', 'query exists') = '',
  2294.      & vsoup = 1 then        /* Found souper.exe there.  Did not find vsoup.exe. */
  2295.       do
  2296.          call beep 1000, 200
  2297.          say ''
  2298.          say ''
  2299.          say 'We did not find VSOUP.EXE in the' yarn 'directory.'
  2300.          say 'This is the program you elected to use to get/send mail and posts'
  2301.          say 'You can copy it to that directory now.  You do not have to exit'
  2302.          say 'this install program to do so. (Of course you copy it later, too.)'
  2303.          say ''
  2304.         say 'Press any key to continue'
  2305.          call SysGetKey 'NOECHO'
  2306.       end
  2307.    when stream(souper_exe, 'c', 'query exists') = '',
  2308.      & stream(vsoup_exe, 'c', 'query exists') = '' then
  2309.         /* Did not find either souper.exe or vsoup.exe there. */
  2310.       do
  2311.          call beep 1000, 200
  2312.          say ''
  2313.          say ''
  2314.          call beep 1000, 200
  2315.          if vsoup = 1 then
  2316.         say 'We did not find VSOUP.EXE in the' yarn 'directory.'
  2317.          if vsoup = 0 then
  2318.          say 'We did not find SOUPER.EXE in the' yarn 'directory.'
  2319.          say 'This is the program you elected to use to get/send mail and posts'
  2320.          say 'You can copy it to that directory now.  You do not have to exit'
  2321.          say 'this install program to do so. (Of course you copy it later, too.)'
  2322.          say ''
  2323.          if vsoup = 1 then
  2324.         say 'We did not find SOUPER.EXE either in the' yarn 'directory.'
  2325.          if vsoup = 0 then
  2326.          say 'We did not find VSOUP.EXE either in the' yarn 'directory.'
  2327.          say 'If you have both SOUPER.EXE and VSOUP.EXE, it is desirable'
  2328.          say 'to copy both in the' yarn 'directory in the event you might'
  2329.          say 'want to switch between them at some future time.'
  2330.          say ''
  2331.          say 'Press any key to continue'
  2332.          call SysGetKey 'NOECHO'
  2333.       end
  2334.    otherwise
  2335.          if vsoup = 1 then
  2336.         say 'We successfully found VSOUP.EXE in the' yarn 'directory.'
  2337.          if vsoup = 0 then
  2338.         say 'We successfully found SOUPER.EXE in the' yarn 'directory.'
  2339.          say 'If you have both SOUPER.EXE and VSOUP.EXE, it is desirable'
  2340.          say 'to have both into the' yarn 'directory in the event you'
  2341.          say 'might want to switch between them at some future time.  Not'
  2342.          say 'necessary, but desirable.'
  2343.          say ''
  2344.          say 'Press any key to continue'
  2345.          call SysGetKey 'NOECHO'
  2346.    end    /* of SELECT */
  2347. RETURN
  2348.  
  2349. /*
  2350. =========================
  2351. should_we_piggyback_on_slippm()
  2352.  
  2353. We can draw parms from tcpos2.ini, as stored there
  2354. by slippm, or we can be prompted to enter (some) of them.
  2355. =========================
  2356. */
  2357. should_we_piggyback_on_slippm:
  2358. piggyback = 1 /* initialize */
  2359. call SysCls
  2360. say ''
  2361. say 'PARAMETERS FOR DIALER'
  2362. say ''
  2363. say 'You can either get parameters your dialer needs from'
  2364. say 'a previous SLIPPM (Dial-Other-Internet-Providers)'
  2365. say 'installation, or you can be prompted for them.  It is'
  2366. say 'much easier to get parameters from a previous SLIPPM'
  2367. say 'setup.'
  2368. say ''
  2369. say 'Select:'
  2370. say '1  Get parameters from a previous SLIPPM installation'
  2371. say '2  Enter parameters from keyboard (prompted)'
  2372. say ''
  2373. say 'To quit so you can configure SLIPPM.EXE, press Escape.' 
  2374.  
  2375. prompt = 'Enter 1 or 2:'
  2376. say ''
  2377. do until pos(piggy, '12') \= 0
  2378.    say prompt
  2379.       parse value SysCurPos() with row col
  2380.       row  = row - 1
  2381.       col = length(prompt) + 2
  2382.       call SysCurPos row, col
  2383.    piggy = SysGetKey('ECHO')
  2384.    say ''
  2385.    if piggy = Escape then signal goodbye
  2386.  
  2387.    if piggy = 1 then
  2388.       do
  2389.          say 'We will piggyback parms from a previous SLIPPM installation'
  2390.          piggyback = 1
  2391.       end
  2392.  
  2393.    if piggy = 2 then
  2394.       do
  2395.          say 'Chose to be prompted for key parameters        '
  2396.          piggyback = 0
  2397.       end
  2398.    if pos(piggy, '12') = 0 then
  2399.       say 'Must enter either 1 or 2.  Try again'
  2400.    say ''
  2401. end
  2402. say ''
  2403. say 'Press any key to continue'
  2404. call SysGetKey 'NOECHO'
  2405. RETURN
  2406.  
  2407.  
  2408. /*
  2409. =========================
  2410. enable_dnk_option()
  2411.  
  2412. Should we enable the do_not_kil option?
  2413.  
  2414. This will allow the connection to be optionally shut down
  2415. or not depending on which keys are pressed at the main menu.
  2416. =========================
  2417. */
  2418. enable_dnk_option:
  2419. do_not_kill_connection = 0        /* initialize to don't enable (=1 is enable) */
  2420. call SysCls
  2421. say ''
  2422. say 'DO NOT-KILL-CONNECTION OPTION'
  2423. say ''
  2424. say 'You can have the connection shut down at the end or not'
  2425. say 'depending on which keys are pressed at the main menu.'
  2426. say 'Or you can have YARNDIAL ALWAYS shut it down at the end.'
  2427. say ''
  2428. say 'Select:'
  2429. say '0  Always shut down connection, etc., when YARNDIAL transfers are done'
  2430. say '1  Give us the option to shut down or not.'
  2431.  
  2432. prompt = 'Enter 0 (zero) or 1:'
  2433. say ''
  2434. do until do_not_kill_connection = 0 | do_not_kill_connection = 1
  2435.    say prompt
  2436.       parse value SysCurPos() with row col
  2437.       row  = row - 1
  2438.       col = length(prompt) + 2
  2439.       call SysCurPos row, col
  2440.    do_not_kill_connection = SysGetKey('ECHO')
  2441.    say ''
  2442.    if do_not_kill_connection = 1 then
  2443.       do
  2444.          say 'Can optionally choose at main menu to leave connection up  '
  2445.          say 'when transfers are done.'
  2446.       end
  2447.    if do_not_kill_connection = 0 then
  2448.       do
  2449.          say 'Connection will always shut down when transfers are done.  '
  2450.          say ''
  2451.          say 'Even though you selected to always close the connection,'
  2452.          say 'you will next be asked for a set of alternate key-presses'
  2453.          say 'to use to keep connection up if later you decide to activate'
  2454.          say 'the ''do-not-close-connection'' option by editing the file'
  2455.          say ydparms_dat || '.'
  2456.       end
  2457.  
  2458.    if do_not_kill_connection \= 0 & do_not_kill_connection \= 1 then
  2459.       say 'Must enter either 0 or 1.  Try again'
  2460.    say ''
  2461. end
  2462. say ''
  2463. say 'Press any key to continue'
  2464. call SysGetKey 'NOECHO'
  2465. RETURN
  2466.  
  2467. /*
  2468. =================
  2469. get_dnk_string()
  2470.  
  2471. Prompt for entry of the alternate characters in place of 1-7
  2472. where connection will not be killed when YARNDIAL finishes.
  2473. This entry populates the variable DNK_STRING in the YD_PARMS.DAT file
  2474. =================
  2475. */
  2476. get_dnk_string:
  2477. call SysCls
  2478. say ''
  2479. say 'DNK_STRING  (DO NOT KILL CONNECTION String)'
  2480. say '  (You will now enter a 7-character string)'
  2481. say ''
  2482. say 'When YARNDIAL opens, the main menu has seven choices (1-7).'
  2483. say ''
  2484. say 'You can specify key-presses to be used in place of 1-7 that leave'
  2485. say 'the modem connected to your ISP when YarnDial finishes.  The best'
  2486. say 'alternate keys to use are: whatever SHIFT-1 thru SHIFT-7 do'
  2487. say 'on your particular national keyboard.  Keyboards will vary from'
  2488. say 'country to country.'
  2489. say '    [you can enter any 7 characters (printables, no CTRL chars)]'
  2490. say ''
  2491. do until length(dnk_string) = 7
  2492.    dnk_string = ''
  2493.    prompt = 'ENTER: (Recommended: SHIFT-1 thru SHIFT-7): '
  2494.    say prompt
  2495.       parse value SysCurPos() with row col
  2496.       row  = row - 1
  2497.       col = length(prompt) + 2
  2498.       call SysCurPos row, col
  2499.    parse pull dnk_string
  2500.    if length(dnk_string) \= 7 then
  2501.       do
  2502.          say ''
  2503.          say 'You entered' length(dnk_string) 'characters.'
  2504.          say ''
  2505.       end 
  2506. end
  2507.    say ''
  2508.    say 'Press any key to continue'
  2509.    call SysGetKey 'NOECHO'
  2510. RETURN
  2511.  
  2512.  
  2513. /*
  2514. ==============================================
  2515. get_passw_PWD()
  2516.  
  2517. Prompt for the Provider Access password.
  2518. ==============================================
  2519. */
  2520.  
  2521. get_passw_PWD:
  2522.  
  2523. call SysCls
  2524. say ''
  2525. say 'PROVIDER ACCESS PASSWORD'
  2526. say ''
  2527. say 'If you press enter instead of entering a password, '
  2528. say 'password is not stored and you will be prompted for one.'
  2529. say 'This is the password for accessing the provider.  For'
  2530. say 'some providers it and the e-mail POP3 password are the'
  2531. say 'same and YARNDIAL uses the POP3 password you were'
  2532. say 'prompted for and responded to earlier.'
  2533. say ''
  2534. say 'In most setups, you will bypass this by pressing ENTER'
  2535. say 'two times, thus not recording any password.'
  2536. say ''
  2537. say ''
  2538. do until match = some_password
  2539.    call pull_password
  2540. end
  2541. PWD = some_password
  2542. RETURN
  2543.  
  2544. /*
  2545. ==============================================
  2546. get_passw_POP3PWD()
  2547.  
  2548. Prompt for the pop password (e-mail).
  2549. ==============================================
  2550. */
  2551.  
  2552. get_passw_POP3PWD:
  2553.  
  2554. call SysCls
  2555. say ''
  2556. say 'POP (e-mail) PASSWORD SCREEN'
  2557. say ''
  2558. say 'Enter password used for e-mail.'
  2559. say 'This is your POP (or POP3) password.'
  2560. say ''
  2561. say ''
  2562. do until match = some_password
  2563.    call pull_password
  2564. end
  2565. POP_PWD = some_password
  2566. RETURN
  2567.  
  2568.  
  2569. /*
  2570. ==============================================
  2571. pull_password()
  2572. and
  2573. get_pw()
  2574.  
  2575. The actual keyboard-entry routine get_pw()
  2576. is a modification of one from the IBM Rexx Manual
  2577. which is copyrighted by IBM and is used here with
  2578. permission.
  2579.  
  2580. pull_password() simply calls the routine get_pw()
  2581. twice:  once to get the password, and again to confirm.
  2582. We do this until an entered password can be confirmed.
  2583.  
  2584. get_pw() accepts the argument H, h, Hide, hide which
  2585. will echo * instead of the character.
  2586. ==============================================
  2587. */
  2588. pull_password:
  2589.  
  2590.    prompt = '          Enter password:'
  2591.    say prompt
  2592.       parse value SysCurPos() with row col
  2593.       row  = row - 1
  2594.       col = length(prompt) + 2
  2595.       call SysCurPos row, col
  2596.       call get_pw 'H'
  2597.    some_password = password
  2598.    say ''
  2599.    prompt = 'Enter it again to verify:'
  2600.    say prompt
  2601.       parse value SysCurPos() with row col
  2602.       row  = row - 1
  2603.       col = length(prompt) + 2
  2604.       call SysCurPos row, col
  2605.       call get_pw 'H'
  2606.       match = password
  2607.    if match \== some_password then say 'The two did not match'
  2608.    say ''
  2609. RETURN
  2610.  
  2611.  
  2612.  
  2613. get_pw: procedure expose password 
  2614.  
  2615. /* H or h or hide as argument echos chars as *
  2616. otherwise chars entered are echoed     */
  2617.  
  2618. parse upper arg hide_for_passwording
  2619. hide_for_passwording = abbrev(hide_for_passwording, 'H')
  2620.  
  2621. bs = d2c(8)
  2622. cr = d2c(13)        /* enter key, as well as carriage return */
  2623. escape = d2c(27)        /* escape character */
  2624. X1 = d2c(0)        /* Extended key */
  2625. X2 = d2c(224)        /* Extended key */
  2626.  
  2627. Valid = xrange(' ', '~') 
  2628. /* same as Valid = ' !"#$%&''()*+,-./0123456789:;',
  2629.          '<=>?@''ABCDEFGHIJKLMNOPQRSTUVWXYZ',
  2630.          '[\]^_abcdefghijklmnopqrstuvwxyz{|}~'
  2631. very nearly every common printable */ 
  2632. password = ''
  2633. MaxLength = 254
  2634.  
  2635. do forever
  2636.    ch = SysGetKey('NOECHO')
  2637.    select
  2638.       when ch = Escape then signal goodbye  /* Escape, so we quit immediately */
  2639.       when ch = cr        /* Enter key pressed */
  2640.          then do
  2641.         say ''        /* Give carriage return */
  2642.         leave
  2643.          end
  2644.       when ch = bs        /* Backspace */
  2645.          then if password = ''
  2646.         then call  beep 262, 200        /* Tell us no chars to bs over */
  2647.          else do        /* Overstrike a blank */
  2648.         call charout , bs bs 
  2649.         password = left(password, length(password)-1)
  2650.          end
  2651.  
  2652.         /* All other characters */
  2653.       when pos(ch, Valid) > 0
  2654.          then if length(password) = MaxLength
  2655.         then call beep 262, 200
  2656.         else do
  2657.          if hide_for_passwording = 1 then call charout , '*'
  2658.          else call charout , ch
  2659.          password = password || ch
  2660.         end
  2661.       otherwise do         /* Swallow next for Extended */
  2662.          if ch = X1 | ch = X2
  2663.         then call SysGetKey 'NOECHO'
  2664.          call  beep 262, 200
  2665.       end
  2666.    end
  2667. end
  2668. RETURN password 
  2669.  
  2670. /*
  2671. ==============================================
  2672. get_dialer_timeout_wait()
  2673.  
  2674. When we dial in, how long before we let our dialer time out?
  2675. ==============================================
  2676. */
  2677. get_dialer_timeout_wait:
  2678. call SysCls
  2679. say ''
  2680. say 'SET DIALER TIMEOUT'
  2681. say ''
  2682. say 'Wait how many seconds before IBM/IGN/Advantis IAK dialer times out.'
  2683. say 'Default: 120 seconds'
  2684. say '(usually allows both main and backup number to be attempted)'
  2685. say ''
  2686. prompt = 'Press Enter to accept default, or enter wait in seconds:' 
  2687. do until DataType(wait,'W')
  2688.    say prompt
  2689.       parse value SysCurPos() with row col
  2690.       row  = row - 1
  2691.       col = length(prompt) + 2
  2692.       call SysCurPos row, col
  2693.       pull wait .
  2694.       if wait = '' then
  2695.          do
  2696.         wait = 120
  2697.          end
  2698.       if DataType(wait) = 0 then say 'Whole number only. Try Again.'
  2699.       else say 'wait =' wait 'seconds'
  2700. end
  2701. say ''
  2702. say 'Press any key to continue'
  2703. call SysGetKey 'NOECHO'
  2704. RETURN
  2705.  
  2706. /*
  2707. ==============================================
  2708. souper_options()
  2709.  
  2710. We set some options for souper and/or vsoup
  2711. ==============================================
  2712. */
  2713.  
  2714. souper_options:
  2715. call SysCls
  2716. souper_getnews_xtra_options = '' /* the defaults */
  2717. souper_getmail_xtra_options = ''
  2718. vsoup_getnews_xtra_options = ''
  2719. vsoup_getmail_xtra_options = ''
  2720. vsoup_send_xtra_options = ''
  2721.  
  2722. option1 = '-k2048'   /* max souppacket size in KB */
  2723. option2 = '-l0'       /* max # of lines in a newsgroup article. 0 is unlimited */
  2724. option3 = ''        /* -a, if want to check for new newsgroups */
  2725. option4 = '-t4'       /* For VSoup: number of simultaneous threads.  Can be 1-10 */
  2726. option5 = '-S1'      /* For VSoup: news-retrieval aggressiveness, can be 0-2 (2 most aggr.) */
  2727. option6 = ''        /* For Vsoup: -M option.  Generate VSoup Status Report (stored with
  2728.         e-mail) every time instead of only when there are exceptions and
  2729.         errors to report.  Can serve as a log and is particularly useful if run
  2730.         yarndial from a timer program remotely. */         
  2731. call SysCls
  2732. say ''
  2733. say 'SOUPER (VSOUP) OPTIONS SCREENS'
  2734. say 'You can set some of the options for how souper or vsoup run.  These'
  2735. say 'can be set, over-ridden or added-to by editing' ydparms_dat
  2736. say 'after this install has completed, instead of using this screen.'
  2737.  
  2738. do until opts = 9
  2739.    say ''
  2740.    say 'These three apply to Souper and VSoup:'
  2741.    say '  1 Set maximum news packetsize (default is 2048KB [2.048MB])'
  2742.    say '  2 Do not retrieve newsgroup articles containing more than a'
  2743.    say '    set number of lines in the body (0 is ''no limit'')'
  2744.    say '  3 Check for new newsgroups (default is ''don''t check'')'
  2745.    say ''
  2746.    say 'These next three only come into play when VSOUP is used:'
  2747.    say '  4 Number of simultaneous news threads.  Default 4, min 1, max 10'
  2748.    say '  5 News receiving strategy (refer VSOUP.INF, YD.DOC).  This is the'
  2749.    say '    VSoup -S parameter. 0, 1 or 2: least to most aggressive. 1 is default.'
  2750.    say '  6 Generate a VSoup Status Report every time instead of default which'
  2751.    say '    generates it only when there are exceptions and errors to report.'
  2752.    say '  7   (reserved for future use)'
  2753.    say '  8 DEFAULT all of the above.'
  2754.    say '  9 WHEN DONE: press 9 to exit this screen'
  2755.    do until pos(opts,'12345689') \= 0 & opts < 10
  2756.       say ''
  2757.       prompt = 'Select 1-6, 8 or 9:'
  2758.       say prompt
  2759.          parse value SysCurPos() with row col
  2760.          row  = row - 1
  2761.          col = length(prompt) + 2
  2762.          call SysCurPos row, col
  2763.       opts = SysGetKey('NOECHO')
  2764.    end
  2765.    
  2766.    select
  2767.       when opts = 1 then call max_news_packet
  2768.       when opts = 2 then call max_news_lines
  2769.       when opts = 3 then call check_for_new_newsgrps
  2770.       when opts = 4 then call vsoup_newsthreads_to_run 
  2771.       when opts = 5 then call news_retrieval_aggressiveness
  2772.       when opts = 6 then call vsoup_status_reporting
  2773.       when opts = 8 then
  2774.          do
  2775.         option1 = '-k2048'
  2776.         option2 = '-l0'
  2777.         option3 = ''
  2778.         option4 = '-t4'
  2779.         option5 = '-S1'
  2780.         option6 = ''
  2781.         say ''
  2782.         say 'Accepting defaults for all options'
  2783.         say ''
  2784.         say ''
  2785.         say 'Press any key to continue'
  2786.         call SysGetKey 'NOECHO'
  2787.          end
  2788.       otherwise say 'Not a valid choice.  Try again.'
  2789.    end /* of Select */
  2790.    call SysCls
  2791. end        /* of DO UNTIL OPTS=9 */
  2792.  
  2793.    souper_getnews_xtra_options = option1 option2
  2794.    souper_getnews_xtra_options = strip(souper_getnews_xtra_options, 'B')
  2795.    souper_getnews_xtra_options = souper_getnews_xtra_options option3
  2796.    souper_getnews_xtra_options = strip(souper_getnews_xtra_options, 'B')
  2797.  
  2798.    souper_getmail_xtra_options = ''        /* We don't set souper mail extra options */
  2799.  
  2800.    vsoup_getnews_xtra_options = souper_getnews_xtra_options
  2801.    vsoup_getnews_xtra_options = vsoup_getnews_xtra_options option4
  2802.    vsoup_getnews_xtra_options = strip(vsoup_getnews_xtra_options, 'B')
  2803.    vsoup_getnews_xtra_options = vsoup_getnews_xtra_options option5
  2804.    vsoup_getnews_xtra_options = strip(vsoup_getnews_xtra_options, 'B')
  2805.    vsoup_getnews_xtra_options = vsoup_getnews_xtra_options option6
  2806.    vsoup_getnews_xtra_options = strip(vsoup_getnews_xtra_options, 'B')
  2807.  
  2808.    vsoup_getmail_xtra_options = vsoup_getmail_xtra_options option6
  2809.    vsoup_getmail_xtra_options = strip(vsoup_getmail_xtra_options, 'B')
  2810.  
  2811.    vsoup_send_xtra_options = vsoup_send_xtra_options option6
  2812.    vsoup_send_xtra_options = strip(vsoup_send_xtra_options, 'B')
  2813.  
  2814. call SysCls
  2815. say ''
  2816. say ''
  2817. say ''
  2818. say 'Done setting options.'
  2819. say 'If you are using Souper.exe, command lines will be:'
  2820. say 'GETMAIL:  souper.exe' souper_getmail_std_options souper_getmail_xtra_options
  2821. say 'GETNEWS:  souper.exe' souper_getnews_std_options souper_getnews_xtra_options
  2822. say 'SENDING:  souper.exe' souper_send_std_options souper_send_xtra_options
  2823. say ''
  2824. say '...and if you are using VSoup.exe, command-lines will start with'
  2825. say 'GETMAIL:  vsoup.exe' vsoup_getmail_std_options vsoup_getmail_xtra_options
  2826. say 'GETNEWS:  vsoup.exe' vsoup_getnews_std_options vsoup_getnews_xtra_options
  2827. say 'SENDING:  vsoup.exe' vsoup_send_std_options vsoup_send_xtra_options
  2828. say ''
  2829. say '   Server, access authorization and other information may be additional.'
  2830. say ''
  2831. say 'Press any key to continue'
  2832. call SysGetKey 'NOECHO'
  2833. RETURN
  2834.  
  2835. /*
  2836. =========================
  2837. max_news_packet()
  2838.  
  2839. Default is a packet-size of 2048 kB (2.048 Megs)
  2840. =========================
  2841. */
  2842. max_news_packet:
  2843. call SysCls
  2844. option1 = 2048
  2845. say ''
  2846. say 'MAXIMUM NEWS-PACKET SIZE'
  2847. say ''
  2848. say 'Enter a number in kilobytes for maximum news packet size.'
  2849. say '2048 is default. 0 sets packet size to unlimited.'
  2850. say ''
  2851. do until datatype(option1, 'W')
  2852.    prompt = 'Enter number of kilobytes now:'
  2853.    say prompt
  2854.    parse value SysCurPos() with row col
  2855.    row  = row - 1
  2856.    col = length(prompt) + 2
  2857.    call SysCurPos row, col
  2858.    pull option1
  2859.    call strip option1, 'B'
  2860.    call strip option1, 'B', tab
  2861.    call strip option1, 'B'
  2862.    call strip option1, 'B', tab
  2863.    if \DataType(option1, 'W') then say 'Must be whole number or zero.'
  2864. end
  2865.  
  2866. say ''
  2867. say 'Maximum packet size for news is set to' option1 'kilobytes'
  2868. option1 = '-k' || option1
  2869. say ''
  2870. say ''
  2871. say 'Press any key to continue'
  2872. call SysGetKey 'NOECHO'
  2873. RETURN
  2874.  
  2875. /*
  2876. =========================
  2877. max_news_lines()
  2878.  
  2879. Default is no limit.  Because of spamming of
  2880. news articles with attached binaries running
  2881. to 10,000 lines or more, you can set a limit.
  2882. I use 500, myself.
  2883. =========================
  2884. */
  2885. max_news_lines:
  2886. call SysCls
  2887. option2 = 0
  2888. say ''
  2889. say 'MAXIMUM SIZE OF NEWS ARTICLES RETRIEVED'
  2890. say ''
  2891. say 'Do not retrieve articles with more than this many lines'
  2892. say 'in the body of the article.  Enter 0 for unlimited (the'
  2893. say 'usual default for souper).'
  2894. say ''
  2895.    do until datatype(option2, 'W')
  2896.       prompt = 'How many lines is the maximum acceptable?'
  2897.       say prompt
  2898.       parse value SysCurPos() with row col
  2899.       row  = row - 1
  2900.       col = length(prompt) + 2
  2901.       call SysCurPos row, col
  2902.       pull option2
  2903.       call strip option2, 'B'
  2904.       call strip option2, 'B', tab
  2905.       call strip option2, 'B'
  2906.       call strip option2, 'B', tab
  2907.       if \DataType(option2, 'W') then say 'Must be whole number or zero.'
  2908.   end
  2909. say ''
  2910. say 'News article not retrieved if over' option2 'lines'
  2911. if option2 = 0 then option2 = ''
  2912. else option2 = '-l' || option2
  2913. say ''
  2914. say ''
  2915. say 'Press any key to continue'
  2916. call SysGetKey 'NOECHO'
  2917. RETURN
  2918.  
  2919. /*
  2920. =========================
  2921. check_for_new_newsgrps()
  2922.  
  2923. 'Y' adds new ones to your newsrc file but inactivated
  2924. until you remove the 'inactivate' character.  Default
  2925. is 'N'
  2926. =========================
  2927. */
  2928. check_for_new_newsgrps:
  2929. call SysCls
  2930. option3 = 'N'
  2931. say ''
  2932. say 'ADD NEW NEWSGROUPS'
  2933. say ''
  2934. say 'Do you want to check for new news groups and have them added'
  2935. say 'to your newsrc file (but set as inactive until you activate them)?'
  2936. prompt = 'Enter Y or N:'
  2937. say ''
  2938. do until pos(option3, 'YyNn') \= 0
  2939.    say prompt
  2940.    parse value SysCurPos() with row col
  2941.    row  = row - 1
  2942.    col = length(prompt) + 2
  2943.    call SysCurPos row, col
  2944.    option3 = SysGetKey('ECHO')
  2945.    if pos(option3, 'YyNn') = 0 then say 'Must be Y or N.  Try again.'
  2946. end
  2947. say ''
  2948. if translate(option3) = 'Y' then
  2949.    do
  2950.       option3 = '-a'
  2951.       say 'You elected to add new news groups to your newsrc'
  2952.    end
  2953. else
  2954.    do
  2955.       option3 = ''
  2956.       say 'You elected not to add new news groups to your newsrc'
  2957.    end
  2958. say ''
  2959. say ''
  2960. say 'Press any key to continue'
  2961. call SysGetKey 'NOECHO'
  2962. RETURN
  2963.  
  2964. /*
  2965. =========================
  2966. vsoup_newsthreads_to_run()
  2967.  
  2968. VSoup, -t option
  2969. =========================
  2970. */
  2971. vsoup_newsthreads_to_run:
  2972. call SysCls
  2973. option4 = 4
  2974. say ''
  2975. say 'VSOUP NEWS THREADS (the -t option)'
  2976. say ''
  2977. say 'Number of simultaneous VSoup threads connecting to news'
  2978. say 'server.  Min is 0, max is 10.  Higher is faster.'
  2979. say '  (4 is safe ground; but 10 is worth trying first)'
  2980. say ''
  2981. do until datatype(option4, 'W') & option4 > 0 & option4 < 11
  2982.    prompt = 'Enter threads (1-10):'
  2983.    say prompt
  2984.    parse value SysCurPos() with row col
  2985.    row  = row - 1
  2986.    col = length(prompt) + 2
  2987.    call SysCurPos row, col
  2988.    pull option4
  2989.    call strip option4, 'B'
  2990.    call strip option4, 'B', tab
  2991.    call strip option4, 'B'
  2992.    call strip option4, 'B', tab
  2993.    if \DataType(option4, 'W') | option4 < 1 | option4 > 10 then say 'Must be 1-10.'
  2994. end
  2995.  
  2996. say ''
  2997. say 'VSoup threads set to' option4
  2998. option4 = '-t' || option4
  2999. say ''
  3000. say ''
  3001. say 'Press any key to continue'
  3002. call SysGetKey 'NOECHO'
  3003. RETURN
  3004.  
  3005.  
  3006. /*
  3007. =========================
  3008. news_retrieval_aggressiveness()
  3009.  
  3010. VSOUP, -S option
  3011. =========================
  3012. */
  3013. news_retrieval_aggressiveness:
  3014. call SysCls
  3015. option5 = 1
  3016. say ''
  3017. say 'VSOUP NEWS-RETRIEVAL AGGRESSIVENESS (the -S option)'
  3018. say ''
  3019. say '  0  Threads are all fetching articles from a single newsgroup'
  3020. say '        at a time.  Least aggressive but best chance of detecting'
  3021. say '        and not duplicating cross-posted articles.'
  3022. say '  1  Intermediate in aggressive retrieval.'
  3023. say '  2  Threads fetch from different groups simultaneously.  Most'
  3024. say '        agressive, fastest, but least effective at detecting'
  3025. say '        and not duplicating cross-posted articles.'
  3026. say ''
  3027. say 'Recommended: 2'
  3028. say ''
  3029. do until pos(option5, '012') \= 0 
  3030.    prompt = 'Enter aggressiveness setting (0, 1, or 2):'
  3031.    say prompt
  3032.    parse value SysCurPos() with row col
  3033.    row  = row - 1
  3034.    col = length(prompt) + 2
  3035.    call SysCurPos row, col
  3036.    option5 = SysGetKey('ECHO')
  3037.    if pos(option5, '012') = 0 then say 'Must be 0, 1, or 2.'
  3038. end
  3039. say ''
  3040. say 'News retrieval aggressiveness set to' option5
  3041. option5 = '-S' || option5
  3042. say ''
  3043. say ''
  3044. say 'Press any key to continue'
  3045. call SysGetKey 'NOECHO'
  3046. RETURN
  3047.  
  3048. /*
  3049. =========================
  3050. vsoup_status_reporting()
  3051.  
  3052. 'Y' adds -M to options.  Default is not to add it.   For Vsoup: -M option
  3053. generates VSoup Status Report (stored with e-mail) every time instead of
  3054. only when there are exceptions and errors to report.  Can serve as a log
  3055. and is particularly useful if run yarndial from a timer program remotely.
  3056. =========================
  3057. */
  3058. vsoup_status_reporting:
  3059. call SysCls
  3060. option6 = '1'
  3061. say ''
  3062. say 'VSOUP STATUS REPORTING'
  3063. say ''
  3064. say 'Do you want to generate VSoup status reports:'
  3065. say '    1  Only for errors and exceptions, and when new news groups'
  3066. say '        are reported'
  3067. say 'or  2  Every time'
  3068. say '     (Note: whichever you choose, any status reports may contain'
  3069. say '      password info)'
  3070. do until pos(option6, '12') \=0
  3071.    prompt = 'Enter 1 or 2:'
  3072.    say ''
  3073.    say prompt
  3074.    parse value SysCurPos() with row col
  3075.    row  = row - 1
  3076.    col = length(prompt) + 2
  3077.    call SysCurPos row, col
  3078.    option6 = SysGetKey('ECHO')
  3079.    if pos(option6, '12') = 0 then say 'Wrong entry.  Try again'
  3080. end
  3081. say ''
  3082. if option6 = '1' then
  3083.    do
  3084.       option6 = ''
  3085.       say 'You elected to generate VSoup status reports only'
  3086.       say 'for errors and exceptions'
  3087.    end
  3088. if option6 = '2' then
  3089.    do
  3090.       option6 = '-M'
  3091.       say 'You elected to generate VSoup status reports every time'
  3092.    end
  3093. say ''
  3094. say ''
  3095. say 'Press any key to continue'
  3096. call SysGetKey 'NOECHO'
  3097. RETURN
  3098.  
  3099. /*
  3100. ==============================================
  3101. Almost done.  No changes to system yet.  Do
  3102. we want to quit before copying files?
  3103. ==============================================
  3104. */
  3105.  
  3106. chance_to_quit:
  3107. call SysCls
  3108. say ''
  3109. say 'WE ARE NOW READY TO COPY FILES...'
  3110. say ''
  3111. say 'Up till now, no changes have been made to your system.'
  3112. say ''
  3113. say 'We will complete installation by creating' ydparms_dat ||','
  3114. say 'by copying other necessary files to your' home 'directory,'
  3115. say 'and by creating some ReXX utility files which we save to'
  3116. say 'the' home 'directory.'
  3117. say ''
  3118. say 'We will create'
  3119. say '   A series of sub-directories for mail, news, and outgoing.'
  3120. say '   (any that already exist are left unchanged).'
  3121. say ''
  3122. say '   A Folder Object on the Desktop containing objects for YARNDIAL'
  3123. say '   and for several utilities including one for starting up YARN.'
  3124. say ''
  3125. say 'No other changes are made to your system.'
  3126. say ''
  3127. say 'To quit without completing installation, press Escape.'
  3128. say ''
  3129. say 'Otherwise PRESS ANY OTHER KEY TO COMPLETE INSTALLATION.'
  3130. if SysGetKey('NOECHO') = Escape then
  3131.    do
  3132.       call SysCls
  3133.       say ''
  3134.       say 'Aborting without copying files to' HOME
  3135.       say 'or creating' ydparms_dat 'or creating the'
  3136.       say 'sub-directory INCOMING.'
  3137.       say ''
  3138.       say 'No changes were made to your system.'
  3139.       signal goodbye
  3140.    end
  3141. RETURN
  3142.  
  3143. /*
  3144. ==============================================
  3145. Write the YD_PARMS.DAT file to the yarn home
  3146. directory to which we are installing YarnDial.
  3147. This has all the data Yarndial needs to be
  3148. able to run from (for) that Yarn user
  3149. installation.
  3150. ==============================================
  3151. */
  3152. output_dat:
  3153. home_drive
  3154. 'cd' home
  3155.  
  3156. o21 = '&\<=>|()! *+"''-/,#$%.0123456789:;?'
  3157. o22 = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^'
  3158. o23 = '_`abcdefghijklmnopqrstuvwxyz{}~'
  3159. e21 = '&\<=>|()u *+"''-/,MI$kUHgW[_A5%w~Fh'
  3160. e22 = 't?K^l0jJP{98xBadb1nZimRyY]4}`o'
  3161. e23 = 'E;67V@vS:C.sNGzcefQpqTr!2#XDLO3'
  3162.  
  3163. /* Encrypt passwords, etc. */
  3164. PWD = translate(PWD, o21||o22||o23, e21||e22||e23)
  3165. POP_PWD = translate(POP_PWD, o21||o22||o23, e21||e22||e23)
  3166. PIN = translate(PIN, o21||o22||o23, e21||e22||e23)
  3167.  
  3168. /* if ydparms_dat or ydaltparms_dat exist, back them up */
  3169. parse var ydparms_dat dat '.' ext
  3170. if stream(ydparms_dat, 'c', 'query exists') \= '' then,
  3171.    do
  3172.       say 'Backing up old' ydparms_dat
  3173.       'copy' ydparms_dat dat || '.bak>nul'
  3174.    end
  3175.  
  3176. call SysFileDelete ydparms_dat
  3177.  
  3178. parse var ydaltparms_dat altdat '.' ext
  3179. if stream(ydaltparms_dat, 'c', 'query exists') \= '' then,
  3180.    do
  3181.       say 'Backing up old' ydaltparms_dat
  3182.       'copy' ydaltparms_dat altdat || '.bak>nul'
  3183.    end
  3184.  
  3185. /* now output data to file YDPARMS_DAT */
  3186. do queued(); pull; end        /* First clear out any lines in rxqueue */ 
  3187.  
  3188. call data        /* put text to be output into rxqueue */
  3189. line = ''
  3190. do queued()
  3191.   parse pull line        /* get it line-by-line and output it to file */
  3192.   call lineout ydparms_dat, line
  3193. end
  3194.  
  3195. call stream ydparms_dat, 'c', 'close'
  3196. yd_parms_dat = translate(ydparms_dat)
  3197. say ydparms_dat 'created/updated.'
  3198. say ''
  3199. RETURN
  3200.  
  3201. /*
  3202. ==============================================
  3203. YD_PARMS.DAT data file.
  3204.  
  3205. These parameters drive YARNDIAL
  3206. ==============================================
  3207. */
  3208. DATA:
  3209. queue '#' ydparms_dat 'created' Date() Time() 'by YDINSTL v.' version
  3210. queue '#'
  3211. queue '#    Edit with any ASCII text editor such as the OS/2 System Editor'
  3212.  
  3213. if connection_type=5 then
  3214.    do
  3215.       queue '#'
  3216.       queue '#    Created by installing YARNDIAL for connection_type = 5'
  3217.       queue '#    (May require editing to complete manual configuration)'
  3218.       queue '#'
  3219.    end
  3220.  
  3221. queue '#    The # sign at the very beginning of a line comments out that line'
  3222. queue '#'
  3223. queue '# These are your Yarn %Home% and %Yarn% directories'
  3224. queue 'HOME=' || home
  3225. queue 'YARN=' || yarn
  3226. queue '#'
  3227. queue '# If DO_NOT_KILL_CONNECTION =1 then if one of the 7 keys in DNK_STRING'
  3228. queue '# is pressed at the main menu instead of 1-7, YARNDIAL performs the same'
  3229. queue '# actions as for 1 thru 7, but the connection is left up when transfers'
  3230. queue '# are completed.'
  3231. queue '# DNK_STRING defaults to !@#$%^& (shift-1 thru shift-7 on US keyboard).'
  3232. queue '# Edit DNK_STRING to whatever 7 keys are convenient for your keyboard.'
  3233. queue '#'
  3234. queue 'DO_NOT_KILL_CONNECTION=' || do_not_kill_connection
  3235. queue 'DNK_STRING=' || dnk_string
  3236. queue '#'
  3237. queue '# ABOUT OVERRIDE_DNK_DURING_REMOTE'
  3238. queue '#   If DO_NOT_KILL_CONNECTION=1 (do not shut down connection), AND'
  3239. queue '#   YARNDIAL is being run by a timer program remotely (i.e., unattended)'
  3240. queue '#   leaving OVERRIDE_DNK_DURING_REMOTE=1 (the default) overrides the'
  3241. queue '#   do-not-kill option then, but allows it during normal (attended) operation.'
  3242. queue '#   If you are determined to leave the connection up when running on a timer'
  3243. queue '#   program and have selected not to kill the connection, you must set'
  3244. queue '#   OVERRIDE_DNK_DURING_REMOTE=0 or the connection will shut down'
  3245. queue '#   when YARNDIAL completes.'
  3246. queue 'OVERRIDE_DNK_DURING_REMOTE=1'
  3247. queue '#'
  3248. queue '# ABOUT THE CONNECTION_TYPE CHOICES:'
  3249. queue '#   1 Installed for IBM/IGN/Advantis via IAK Dialer.'
  3250. queue '#   2 (Reserved)'
  3251. queue '#   3 Installed for use of a slip.exe or ppp.exe dialup string.'
  3252. queue '#   4 Installed for SLIPPM (IBM''s Dial-Other-Internet-Providers.'
  3253. queue '#     Utility) or a SLIPPM replacement such as ILINK/2, IN-JOY, etc.'
  3254. queue '#   5 You chose manual configuration: to be prompted for key parameters'
  3255. queue '#     followed by manually editing this file as necessary.'
  3256. queue '#   6 Pot-Luck:  Tries to use any connection that happens to be'
  3257. queue '#     established.  Connection must be made BEFORE you start YarnDial.'
  3258. queue '#   7 Like 6, but does not check for a connection, and uses the string'
  3259. queue '#     in dialup_string to dial.'
  3260. queue '#   Anything but 1 or 3-7 for connection_type is an error condition.'
  3261. queue '#'
  3262. queue 'connection_type=' || connection_type
  3263. queue '#'
  3264. queue '# ABOUT DIALUP_STRING:'
  3265. queue '#   If you plan to use a ppp.exe or slip.exe or other dialup string'
  3266. queue '#   which uses either SLIP.EXE or PPP.EXE to make the connection,'
  3267. queue '#   enter it below if it has not automatically been entered.'
  3268. queue '#   Read' YD_DOC 'for further information.'
  3269. queue '#   YARNDIAL executes dialup_string as the evaluated expression:'
  3270. queue '#      interpret dialup_string'
  3271. queue '#   What you enter for dialup_string should consist of ''start'''
  3272. queue '#   (always required) plus /N (usually) plus the dialer executable'
  3273. queue '#   such as ppp.exe, slippm.exe, etc., plus any arguments.'
  3274. queue '#'
  3275. queue 'dialup_string=' || dialup_string  
  3276. queue '#'
  3277. queue '# SETTING INTERFACE_REMOVAL:'
  3278. queue '#   IN-JOY sometimes leaves behind a phantom router interface after'
  3279. queue '#   the connection and IN-JOY are terminated.  You can test for this'
  3280. queue '#   by running netstat -r after YARNDIAL (or INJOY) has shut down.'
  3281. queue '#   You can wipe out such phantoms if you set interface_removal to'
  3282. queue '#   1 or 2.  A setting of 0 is the default and does not do anything.'
  3283. queue '#'
  3284. queue '# interface_removal=0       Use this if you regularly establish'
  3285. queue '#   simultaneous connections via SLIP or PPP through more than one COM'
  3286. queue '#   port at a time.  But if phantom routings are left by IN-JOY, you'
  3287. queue '#   will have to live with the problem.  Choose this if you never use'
  3288. queue '#   IN-JOY.'
  3289. queue '# interface_removal=1       Deletes any routing entries left standing'
  3290. queue '#   but only if IN-JOY is your dialer and if the interf_prefix in the'
  3291. queue '#   routing entry matches IN-JOY''s  Suggestion: set the interface'
  3292. queue '#   name in one of the IN-JOY OPTIONS pages to something unique for'
  3293. queue '#   your connection to achieve maximum selectivity during operation of'
  3294. queue '#   interface_removal = 1 (an IN-JOY interface name up to five letters'
  3295. queue '#   long can be used)'
  3296. queue '# interface_removal = 2       Whatever the dialer and interf_prefix'
  3297. queue '#   deletes all routing entries at shut_down of YARNDIAL.  If you'
  3298. queue '#   have a problem with phantom routings using IN-JOY and never expect'
  3299. queue '#   to have make simultaneous connections via SLIP or PPP through more'
  3300. queue '#   than one COM port at a time,  try setting interface_removal = 2.'  
  3301. queue '#'
  3302. queue 'interface_removal=' || interface_removal
  3303. queue '#'
  3304. queue '# ABOUT ZIP/UNZIP UTILITIES:'
  3305. queue '# Depending upon what compress and uncompress utilities you use'
  3306. queue '# you may need to edit zip_exe= and unzip_exe=  below (use full paths)'
  3307. queue '#         Samples:'
  3308. queue '#       OS/2 InfoZip compress/uncompress programs:'
  3309. queue '#        zip_exe=d:\pk_unpk\zip201c2\zip.exe -0m'
  3310. queue '#        unzip_exe=d:\pk_unpk\unz512x2\unzip.exe -o'
  3311. queue '#'
  3312. queue '#       MS-DOS PkWare compress/uncompress programs:'
  3313. queue '#        zip_exe=cmd.exe /c c:\path\pkzip -m -u -o'
  3314. queue '#        unzip_exe=cmd.exe /c c:\path\pkunzip -o'
  3315. queue '# Using another compress/uncompress set?  Refer to' yd_doc || '.'
  3316. queue '# For any MSDOS based ones, you must use  cmd.exe /c  to call them'
  3317. queue '# as shown for the PkWare examples'
  3318. queue '#'
  3319. queue 'zip_exe=' || zip_exe
  3320. queue 'unzip_exe=' || unzip_exe
  3321. queue '#'
  3322. queue '#'
  3323. queue '# host (the domain), user (e-mail ID) are from YARN''s CONFIG file.'
  3324. queue '# reply_packet holds the value assigned to reply-packet in YARN''s'
  3325. queue '# CONFIG file.'
  3326. queue '#'
  3327. queue 'host=' || host
  3328. queue 'user=' || user
  3329. queue 'reply_packet=' || reply_packet
  3330. queue '#'
  3331. queue 'souper_exe=' || souper_exe
  3332. queue 'vsoup_exe=' || vsoup_exe 
  3333. queue 'yarn_exe=' || yarn_exe 
  3334. queue 'import_exe=' || import_exe 
  3335. queue 'export_exe=' || export_exe 
  3336. queue 'expire_exe=' || expire_exe 
  3337. queue 'rebuild_exe=' || rebuild_exe
  3338. queue 'go_exe=' || go_exe
  3339. queue 'killjoy_exe=' || killjoy_exe
  3340. queue 'alt_dialer_exe=' || alt_dialer_exe
  3341. queue '#'
  3342. queue '# ABOUT INTERF_PREFIX'
  3343. queue '# The IN-JOY dialer allows the user during dialer configuration to'
  3344. queue '# specify a custom name (up to 5 characters) for the named-interface'
  3345. queue '# prefix in place of the more usual ppp or sl or slip or lan prefixes'
  3346. queue '# (as examples).  In multi-user YARNDIAL installations using IN-JOY as'
  3347. queue '# the dialer, this interface-prefix parameter may be set to be unique'
  3348. queue '# for each user and we can use it as an identifier.  For other dialers'
  3349. queue '# interf_prefix defaults to PPP, ppp or SL or sl, etc., depending on'
  3350. queue '# what is indicated for SERVICE and what is known about the dialer.' 
  3351. queue '#'
  3352. queue 'interf_prefix=' || interf_prefix
  3353. queue '#'
  3354. queue '# ABOUT VSOUP'
  3355. queue '# vsoup=1 means we are using vsoup.exe; vsoup=0 means souper.exe'
  3356. queue '#'
  3357. queue 'VSOUP=' || vsoup
  3358. queue '#'
  3359. queue '# CUSTOMIZING SOUPER AND VSOUP RUN-TIME OPTIONS'
  3360. queue '# You can modify the runtime options for souper.exe or vsoup by editing'
  3361. queue '# these.  Read over' yd_doc 'and the souper documentation before'
  3362. queue '# doing so.  DO NOT change the ones indicated as _std_ .  Especially, DO'
  3363. queue '# NOT remove the -i''s because we read our set up variables from this file'
  3364. queue '# and not from the TCP-IP settings notebooks when we run the souper'
  3365. queue '# program.'
  3366. queue '#'
  3367. queue '# FOR RUNNING SOUPER.EXE, options below will be used in YARNDIAL strings'
  3368. queue '# of the general form:'
  3369. queue '#   Souper.exe xxx_std_options xxx_xtra_options'
  3370. queue '#       with <server> <userID> <password> tacked on.'
  3371. queue '#'
  3372. queue 'souper_getmail_std_options=' || souper_getmail_std_options
  3373. queue 'souper_getnews_std_options=' || souper_getnews_std_options
  3374. queue 'souper_send_std_options=' || souper_send_std_options
  3375. queue 'souper_getmail_xtra_options=' || souper_getmail_xtra_options
  3376. queue 'souper_getnews_xtra_options=' || souper_getnews_xtra_options
  3377. queue 'souper_send_xtra_options=' || souper_send_xtra_options
  3378. queue '#'
  3379. queue '# FOR RUNNING VSOUP.EXE, options below will be used in YARNDIAL strings'
  3380. queue '# of the general form:'
  3381. queue '#   VSoup.exe xxx_std_options xxx_xtra_options zzzz://userID:password@server'
  3382. queue '# where zzzz will be either pop3, nntp, or smpt; server will be the'
  3383. queue '# mail, news or smtp server.'
  3384. queue '#'
  3385. queue 'vsoup_getmail_std_options=' || vsoup_getmail_std_options
  3386. queue 'vsoup_getnews_std_options=' || vsoup_getnews_std_options
  3387. queue 'vsoup_send_std_options=' || vsoup_send_std_options
  3388. queue 'vsoup_getmail_xtra_options=' || vsoup_getmail_xtra_options
  3389. queue 'vsoup_getnews_xtra_options=' || vsoup_getnews_xtra_options
  3390. queue 'vsoup_send_xtra_options=' || vsoup_send_xtra_options
  3391. queue '#'
  3392. queue '#'
  3393. queue '# ABOUT GETMAIL_AUTHO, GETNEWS_AUTHO, and SEND_AUTHO'
  3394. queue '# Selects how ID and password authorizations are handled on command lines'
  3395. queue '# for accessing POP3, NNTP, and SMTP servers, respectively.  These apply to'
  3396. queue '# both Souper and VSoup command lines but illustration below of how the xxx_Autho'
  3397. queue '# choices affect ID and password and servername selection are for VSoup command'
  3398. queue '# lines only.'
  3399. queue '# GetNews_Autho.1=1         vsoup.exe vsoup_options nntp://pop_id:pop_pwd@defaut_news'
  3400. queue '# GetNews_Autho.1=2         vsoup.exe vsoup_options nntp://login_id:pwd@defaut_news'
  3401. queue '# GetNews_Autho.1=3         vsoup.exe vsoup_options nntp://defaut_news'
  3402. queue '#    where vsoup_options = the combined _std_ and _xtra_ options above, and'
  3403. queue '#    default_news is the nntp server'
  3404. queue '# In like fashion, GetMail_Autho applies to the POP3 server and Send_Autho to the SMTP'
  3405. queue '# server.  If the default of the particular xxx_autho as 1 doesn''t work, try 3 and then 2'
  3406. queue '#    (All of the Getxxx_Autho parameters are near the end of this .DAT file)'
  3407. queue '#'
  3408. queue '# WAIT is a dialer timeout, in seconds'
  3409. queue 'wait=' || wait 
  3410. queue '#'
  3411. queue '#    The following is the name of the Dial-Other-Internet-Providers'
  3412. queue '#    app in TCPOS2.INI, or the host-name argument for the dialer command'
  3413. queue 'host_app=' || host_app
  3414. queue '#'
  3415. queue '#   Parms extracted from the TCPOS2.INI file, from'
  3416. queue '#   the IAK DIALER.INI file, combined (where they overlap)'
  3417. queue '#   using wherever possible the TCPOS2.INI key names'
  3418. queue '#'
  3419. queue 'account=' || account
  3420. queue 'ASK=' | |ASK
  3421. queue 'IS1=' || IS1
  3422. queue 'IS2=' || IS2
  3423. queue 'RS1=' || RS1
  3424. queue 'RS2=' || RS2
  3425. queue 'FS1=' || FS1
  3426. queue 'FS2=' || FS2
  3427. queue 'PIN=' || PIN
  3428. queue '#'
  3429. queue '#'
  3430. queue 'PROVIDER=' || PROVIDER
  3431. queue 'SAVE_PWD=' || SAVE_PWD
  3432. queue 'PHONE_NUMBER=' || PHONE_NUMBER
  3433. queue 'HANGUP=' || HANGUP
  3434. queue 'SCRIPT=' || SCRIPT
  3435. queue 'SERVICE=' || SERVICE
  3436. queue 'YOURIP=' || YOURIP
  3437. queue 'DESTIP=' || DESTIP
  3438. queue 'NETMASK=' || NETMASK
  3439. queue 'MTU_SIZE=' || MTU_SIZE
  3440. queue 'VJ_COMP=' || VJ_COMP
  3441. queue 'PRIMARY_INF=' || PRIMARY_INF
  3442. queue 'HOSTNAME=' || HOSTNAME
  3443. queue 'DOMAIN_NAME=' || DOMAIN_NAME
  3444. queue 'DNS=' || DNS
  3445. queue 'DNS2=' || DNS2
  3446. queue 'DEFAULT_WWW=' || DEFAULT_WWW
  3447. queue 'DEFAULT_GOPHER=' || DEFAULT_GOPHER
  3448. queue 'REPLY_DOMAIN=' || REPLY_DOMAIN
  3449. queue 'REPLY_ID=' || REPLY_ID
  3450. queue 'MODEM_TYPE=' || MODEM_TYPE
  3451. queue 'COMPORT=' || COMPORT
  3452. queue 'BAUD=' || BAUD
  3453. queue 'DATABITS=' || DATABITS
  3454. queue 'PARITY=' || PARITY
  3455. queue 'DIAL_MODE=' || DIAL_MODE
  3456. queue 'PREFIX=' || PREFIX
  3457. queue 'PREFIX_ANS=' || PREFIX_ANS
  3458. queue 'INIT=' || INIT
  3459. queue 'INIT2=' || INIT2
  3460. queue 'DISABLE=' || DISABLE
  3461. queue 'DISABLE_SEQ=' || DISABLE_SEQ
  3462. queue 'DIAL_PREFIX=' || DIAL_PREFIX
  3463. queue 'AUTOSTART=' || AUTOSTART
  3464. queue 'TOTAL_CONNECT=' || TOTAL_CONNECT
  3465. queue '#'
  3466. queue '# ********** Internet Service Provider Fields **********'
  3467. queue '# YarnDial can recognize any number of ISP''s.  Space for 3 is provided below.'
  3468. queue '#' 
  3469. queue '# More ISP''s can be added to this file.  Each can be toggled ON and OFF'
  3470. queue '# with their respective ISP_ACTIVE.i switches (1 is ON, 0 is OFF).'
  3471. queue '# There is no MAIL_GW or SEND_AUTHO for ISP''s 2 and greater because'
  3472. queue '# we always send using parameters of ISP 1.'
  3473. queue '#'
  3474. queue '# ENCR_PWD and ENCR_POP_PWD fields are for encrypted passwords.'
  3475. queue '# If the field for non-encrypted-passwords (PWD or POP_PWD) is filled'
  3476. queue '# in, that entry over-rides any entry for its encrypted counterpart.  That'
  3477. queue '# allows the user to experiment easily by just editing this file.'
  3478. queue '#' 
  3479. queue '# TO ENCRYPT PASSWORDS:'
  3480. queue '#    From an OS/2 command line, change to a directory in which YDINSTL'
  3481. queue '#    resides.  To encrypt MyPassword, type in the following and press ENTER:'
  3482. queue '#         YDINSTL.CMD encrypt MyPassword'     
  3483. queue '#    Then transfer (type in or copy & paste) the encrypted password into this'
  3484. queue '#    file.  This is further discussed in YD.DOC, section 21.00.'
  3485. queue '#'
  3486. queue '# Your YarnDial installation with YDONSTL.CMD has set up this first ISP.'
  3487. queue '# ISP_ACTIVE for it (ISP_ACTIVE.1) must always be =1.'
  3488. queue 'ISP_ACTIVE.1=1'
  3489. queue 'LOGIN_ID.1=' || LOGIN_ID
  3490. queue 'ENCR_PWD.1=' || PWD 
  3491. queue 'PWD.1='
  3492. queue 'POP_ID.1=' || POP_ID
  3493. queue 'ENCR_POP_PWD.1=' || POP_PWD 
  3494. queue 'POP_PWD.1=' 
  3495. queue 'DEFAULT_NEWS.1=' || DEFAULT_NEWS
  3496. queue 'POPSRVR.1=' || POPSRVR
  3497. queue 'MAIL_GW.1=' || MAIL_GW
  3498. queue 'GETMAIL_AUTHO.1=1'
  3499. queue 'GETNEWS_AUTHO.1=1'
  3500. queue 'SEND_AUTHO.1=1'
  3501. queue '#'
  3502. queue 'ISP_ACTIVE.2=0'
  3503. queue 'LOGIN_ID.2='
  3504. queue 'ENCR_PWD.2='
  3505. queue 'PWD.2='
  3506. queue 'POP_ID.2='
  3507. queue 'ENCR_POP_PWD.2='
  3508. queue 'POP_PWD.2='
  3509. queue 'DEFAULT_NEWS.2='
  3510. queue 'POPSRVR.2='
  3511. queue 'GETMAIL_AUTHO.2=1'
  3512. queue 'GETNEWS_AUTHO.2=1'
  3513. queue '#'
  3514. queue 'ISP_ACTIVE.3=0'
  3515. queue 'LOGIN_ID.3='
  3516. queue 'ENCR_PWD.3='
  3517. queue 'PWD.3='
  3518. queue 'POP_ID.3='
  3519. queue 'ENCR_POP_PWD.3='
  3520. queue 'POP_PWD.3='
  3521. queue 'DEFAULT_NEWS.3='
  3522. queue 'POPSRVR.3='
  3523. queue 'GETMAIL_AUTHO.3=1'
  3524. queue 'GETNEWS_AUTHO.3=1'
  3525. queue '# Add more ISP''s as desired.'
  3526. queue '#'
  3527. queue '# End of' ydparms_dat
  3528. RETURN        
  3529.  
  3530. /*
  3531. ==============================================
  3532. copy_ydfiles()
  3533.  
  3534. Copy over files from the installation
  3535. directory to the home directory.  We expect to find the icon
  3536. files in a subdirectory (ICONS) but if you happened to use
  3537. PkWare unzip without the -d option they will not be
  3538. there so we will look for them in the installer's directory
  3539. also to avoid an abortable error.
  3540. ==============================================
  3541. */
  3542. copy_ydfiles:
  3543.  
  3544. /*
  3545. ============================
  3546. Create minimum number of incoming subdirectories in the
  3547. home directory if not there already, and create an outgoing dir also.
  3548. ============================
  3549. */
  3550. call SysMkDir home || '\yarn'        /* of course this already exists */
  3551. call SysMkDir home || '\yarn\in'
  3552. call SysMkDir home || '\yarn\in\mail'
  3553. call SysMkDir home || '\yarn\in\news'
  3554. call SysMkDir home || '\yarn\out'
  3555.  
  3556.  
  3557. /* We need to create an ICONS subdirectory in our target
  3558. home directory as part of the installation */
  3559.  
  3560. call SysMkDir home || '\icons'
  3561.  
  3562. /* get down to filename only, strip and path, arguments */
  3563. yd_cmd = filespec('name', yd_cmd)
  3564. ydinstl_cmd = filespec('name', ydinstl_cmd)
  3565. yarn_ico = filespec('name', yarn_ico)
  3566. yd_doc = filespec('name', yd_doc)
  3567. readme_1st = filespec('name', readme_1st)
  3568. go_exe = filespec('name', go_exe)
  3569. yarn_ico = filespec('name', yarn_ico)
  3570. yarndial_ico = filespec('name', yarndial_ico)
  3571. ydfold1_ico = filespec('name', ydfold1_ico)
  3572. ydfold2_ico = filespec('name', ydfold2_ico)
  3573. yarnshell_ico = yarn_ico
  3574. yarnutil_ico = filespec('name', yarnutil_ico)
  3575. ydinstl_ico = filespec('name', ydinstl_ico)
  3576. logoff_ico = filespec('name', logoff_ico)
  3577. renewzip_ico = filespec('name', renewzip_ico)
  3578.  
  3579. /*
  3580. ============================
  3581. First copy over icons. If they are not in an icons subdirectory
  3582. we look for them in the source directory.  And if they are only in
  3583. an icon subdirectory and the source_path is the same as home, we do
  3584. nothing as we can't copy something over onto itself
  3585.  
  3586. if we try a wildcard copy (copy *.ico) and there are no files to copy, we get an
  3587. error, so we need to have at least one file to copy.  Hence these awful multipart
  3588. conditionals
  3589. ============================
  3590. */
  3591.  
  3592. if home \= source_path then
  3593.    do
  3594.       if stream(source_path || '\icons\' || yarn_ico, 'c', 'query exists') \= '',
  3595.        | stream(source_path || '\icons\' || yarndial_ico, 'c', 'query exists') \= '',
  3596.        | stream(source_path || '\icons\' || ydfold1_ico, 'c', 'query exists') \= '',
  3597.        | stream(source_path || '\icons\' || ydfold2_ico, 'c', 'query exists') \= '',
  3598.        | stream(source_path || '\icons\' || yarnutil_ico, 'c', 'query exists') \= '',
  3599.        | stream(source_path || '\icons\' || ydinstl_ico, 'c', 'query exists') \= '',
  3600.        | stream(source_path || '\icons\' || renewzip_ico, 'c', 'query exists') \= '',
  3601.        | stream(source_path || '\icons\' || logoff_ico, 'c', 'query exists') \= '' then
  3602.         do
  3603.          say 'Copying icon files from' source_path || '\icons to' HOME || '\icons'
  3604.          'copy' source_path || '\icons\' || '*.ico' home || '\icons' 
  3605.         end
  3606.    end
  3607.  
  3608. if stream(source_path || '\' || yarn_ico, 'c', 'query exists') \= '',
  3609.  | stream(source_path || '\' || yarndial_ico, 'c', 'query exists') \= '',
  3610.  | stream(source_path || '\' || ydfold1_ico, 'c', 'query exists') \= '',
  3611.  | stream(source_path || '\' || ydfold2_ico, 'c', 'query exists') \= '',
  3612.  | stream(source_path || '\' || yarnutil_ico, 'c', 'query exists') \= '',
  3613.  | stream(source_path || '\' || ydinstl_ico, 'c', 'query exists') \= '',
  3614.  | stream(source_path || '\' || renewzip_ico, 'c', 'query exists') \= '',
  3615.  | stream(source_path || '\' || logoff_ico, 'c', 'query exists') \= '' then
  3616.    do
  3617.       say 'Copying icon files from' source_path 'to' HOME || '\icons'
  3618.       'copy' source_path || '\' || '*.ico' home || '\icons' 
  3619.    end
  3620.  
  3621.  
  3622.   
  3623. /*
  3624. ============================
  3625. Then copy remaining files to complete the installation.  Again, if we are already
  3626. installing to the home directory and source_path is the home directory instead of
  3627. some other (temporary) one, just exit the routine because files are already where we
  3628. want them
  3629. ============================
  3630. */
  3631.  
  3632. if home = source_path then
  3633.    do
  3634.       nop
  3635.    end
  3636.  
  3637. else
  3638.    do
  3639.       say 'Copying rest of files from' source_path 'to' HOME
  3640.       home_drive
  3641.       'cd' home
  3642.  
  3643.       if stream(source_path || '\' || yd_cmd, 'c', 'query exists') \= '' then
  3644.          do
  3645.         say 'Copying' yd_cmd
  3646.         'copy' source_path || '\' || yd_cmd || '>nul'
  3647.         if \SysSetIcon(yd_cmd, home || '\icons\' || yarndial_ico) then
  3648.          say 'unable to set icon for' yd_cmd '(NON-CRITICAL ERROR)'
  3649.          end
  3650.  
  3651.       if stream(source_path || '\' || ydinstl_cmd, 'c', 'query exists') \= ''  then
  3652.          do
  3653.         say 'Copying' ydinstl_cmd
  3654.         'copy' source_path || '\' || ydinstl_cmd || '>nul'
  3655.         if \SysSetIcon(ydinstl_cmd, home || '\icons\' || ydinstl_ico) then
  3656.          say 'unable to set icon for' ydinstl_cmd '(NON-CRITICAL ERROR)'         
  3657.          end
  3658.  
  3659.    if stream(source_path || '\' || yd_doc, 'c', 'query exists') \= '' then
  3660.          do
  3661.         say 'Copying' yd_doc
  3662.         'copy' source_path || '\' || yd_doc || '>nul'
  3663.          end
  3664.  
  3665.    if stream(source_path || '\' || readme_1st, 'c', 'query exists') \= '' then
  3666.          do
  3667.         say 'Copying' readme_1st
  3668.         'copy' source_path || '\' || readme_1st || '>nul'
  3669.          end
  3670.  
  3671.    if stream(source_path || '\' || go_exe, 'c', 'query exists') \= '' then
  3672.          do
  3673.         say 'Copying' go_exe
  3674.         'copy' source_path || '\' || go_exe || '>nul'
  3675.          end
  3676.  
  3677. end /* of else */
  3678.  
  3679. completed = 1
  3680. RETURN
  3681.  
  3682. /*
  3683. =======================================================
  3684. We create  a suite of small REXX programs and save them to the HOME
  3685. directory we are now installing to.  All of these will run with the OS/2
  3686. environment variable, HOME, set using SetLocal() to the unique home
  3687. directory chosen for this particular user installation.
  3688.  
  3689. First we create a program (YRNSHELL.CMD) which starts
  3690. yarn.exe for this particular user installation.
  3691. =======================================================
  3692. */ 
  3693. create_yarnshell_cmd:
  3694. say 'Creating customized .CMD files for the' home 'directory'
  3695. home_drive
  3696. 'cd' home
  3697.  
  3698. yarnshell_cmd = filespec('name', yarnshell_cmd)
  3699.  
  3700. call SysFileDelete yarnshell_cmd
  3701.  
  3702. /* Now create yarnshell_cmd as a .CMD file in the HOME directory */
  3703. do queued(); pull; end        /* First clear out any lines in rxqueue */ 
  3704.  
  3705. queue '/*' yarnshell_cmd
  3706. queue 'Program to start' yarn_exe
  3707. queue 'Created by YARNDIAL''s' ydinstl_cmd date() time()
  3708. queue 'Sets' HOME 'as the HOME env. variable,'
  3709. queue 'sets' yarn 'as the YARN env. variable, sets'
  3710. queue 'directory to' yarn 'and sets OS/2 window size.   */'
  3711. queue
  3712. queue 'x = SetLocal()'
  3713. queue '''@echo off'''
  3714. queue 'x = value(''home'', ''' || home || ''', ''OS2ENVIRONMENT'')'
  3715. queue 'x = value(''yarn'', ''' || yarn || ''', ''OS2ENVIRONMENT'')'
  3716. queue home_drive
  3717. queue '''cd' home || ''''
  3718. queue '''' || conmode || ''''
  3719. queue '''' || yarn_exe || ''''
  3720. queue 'x = EndLocal()'
  3721.  
  3722. line = ''
  3723. do queued()        /* output everything in rxqueue to file */
  3724.   parse pull line
  3725.   call lineout yarnshell_cmd, line
  3726. end
  3727.  
  3728. call stream yarnshell_cmd, 'c', 'close'
  3729. say '  ' yarnshell_cmd 'created/updated.'
  3730. if \SysSetIcon(yarnshell_cmd, home || '\icons\' || yarn_ico) then
  3731.    say 'unable to set icon for' yarnshell_cmd '(NON-CRITICAL ERROR)'
  3732. RETURN
  3733.  
  3734.  
  3735. /*
  3736. =======================================================
  3737. Create a program (YRNUTIL.CMD) to run yarn utilities for
  3738. this particular user installation.  It temporarily sets
  3739. a variable named home in the the OS/2 environment to the
  3740. home directory chosen for this particular user installation,
  3741. then prompts for the yarn utility to run, then runs it.
  3742. =======================================================
  3743. */ 
  3744.  
  3745. create_yarnutil_cmd:
  3746. home_drive
  3747. 'cd' home
  3748.  
  3749. yarnutil_cmd = filespec('name', yarnutil_cmd)
  3750.  
  3751. call SysFileDelete yarnutil_cmd
  3752.  
  3753. /* Now create yarnutil_cmd as a .CMD file in the HOME directory */
  3754. do queued(); pull; end        /* First clear out any lines in rxqueue */ 
  3755.  
  3756. queue '/* */'
  3757. queue 'say ''' || yarnutil_cmd || ''''
  3758. queue 'say ''Program to start a yarn executable.'''
  3759. queue 'say ''Sets' HOME 'as the HOME env. variable'''
  3760. queue 'say ''and sets' yarn 'as the YARN env. variable.'''
  3761. queue 'say ''Sets working directory to' yarn || ''''
  3762. queue 'say ''Created by YARNDIAL''''s' ydinstl_cmd date() time() || ''''
  3763. queue 'say '''''
  3764. queue '/* Load RexxUtil if not already loaded */'
  3765. queue 'if RxFuncQuery(''SysLoadFuncs'') \= 0 then'
  3766. queue '   do'
  3767. queue '      call RxFuncAdd ''SysLoadFuncs'', ''REXXUTIL'', ''SysLoadFuncs'''
  3768. queue '      call SysLoadFuncs'
  3769. queue '   end'
  3770. queue 'x = SetLocal()'
  3771. queue '''@echo off'''
  3772. queue 'x = value(''home'', ''' || home || ''', ''OS2ENVIRONMENT'')'
  3773. queue 'x = value(''yarn'', ''' || yarn || ''', ''OS2ENVIRONMENT'')'
  3774. queue yarn_drive
  3775. queue '''cd' yarn || ''''
  3776. queue 'say ''What yarn utility do you want to run?'''
  3777. queue 'prompt = ''Omit the path. Enter:'''
  3778. queue 'say prompt'
  3779. queue 'parse value SysCurPos() with row col'
  3780. queue 'row  = row - 1'
  3781. queue 'col = length(prompt) + 2'
  3782. queue 'call SysCurPos row, col'
  3783. queue 'parse pull yarn_utility'
  3784. queue 'yarn_utility'
  3785. queue 'x = EndLocal()'
  3786. queue 'say '''''
  3787. queue 'say ''Done.  Press any key to exit...'''        
  3788. queue 'answer = SysGetKey(''NOECHO'')'
  3789.  
  3790. line = ''
  3791. do queued()        /* output everything in rxqueue to file */
  3792.   parse pull line
  3793.   call lineout yarnutil_cmd, line
  3794. end
  3795.  
  3796. call stream yarnutil_cmd, 'c', 'close'
  3797. say '  ' yarnutil_cmd 'created/updated.'
  3798. if \SysSetIcon(yarnutil_cmd, home || '\icons\' || yarnutil_ico) then
  3799.    say 'unable to set icon for' yarnutil_cmd '(NON-CRITICAL ERROR)'
  3800. RETURN
  3801.  
  3802. /*
  3803. =======================================================
  3804. Create a logoff program (LOGOFF.CMD).  It determines if
  3805. any of the following are up and running, and if so, closes
  3806. them down: SLIP.EXE, PPP.EXE, DIALER.EXE, SLIPPM.EXE.
  3807. This will work in any environment but we place a copy
  3808. in each home directory we install to (convenient to do so).
  3809.  
  3810. I wanted something like this so if for some reason I was
  3811. logged on and wanted a sure-fire shut-down freeing up my
  3812. phone line, I could do it with one double-click.
  3813.  
  3814. This uses go.exe from GO_15.EXE.  go.exe is supplied with
  3815. this yarndial/installer package.
  3816. =======================================================
  3817. */ 
  3818.  
  3819. create_logoff_cmd:
  3820. home_drive
  3821. 'cd' home
  3822.  
  3823. logoff_cmd = filespec('name', logoff_cmd)
  3824.  
  3825. call SysFileDelete logoff_cmd
  3826.  
  3827. /* Now create logoff_cmd as a .CMD file in the HOME directory */
  3828. do queued(); pull; end        /* First clear out any lines in rxqueue */ 
  3829.  
  3830. queue '/* */'
  3831. queue 'say ''' || logoff_cmd || ''''
  3832. queue 'say ''Shutdown of IAK Dialer, SLIP, PPP, SLATTACH, SLIPPM, IN-JOY'''
  3833. queue 'say ''Created by YARNDIAL''''s' ydinstl_cmd date() time() || ''''
  3834. queue
  3835. queue 'say '''''
  3836. queue '/* --------  you can edit these 3 things -------- */'
  3837. queue 'go_exe = ''' || go_exe || '''        /* full path to GO_15''s GO.EXE */'
  3838. queue 'killjoy_exe = ''' || killjoy_exe || '''        /* full path to IN-JOY''s KILLJOY.EXE */'
  3839. queue 'settle_time = 10  /* seconds,  settle down before rechecking */'
  3840. queue
  3841. queue
  3842. queue '/* Load RexxUtil if not already loaded */'
  3843. queue 'if RxFuncQuery(''SysLoadFuncs'') \= 0 then'
  3844. queue '   do'
  3845. queue '      call RxFuncAdd ''SysLoadFuncs'', ''REXXUTIL'', ''SysLoadFuncs'''
  3846. queue '      call SysLoadFuncs'
  3847. queue '   end'
  3848. queue '''@echo off'''
  3849. queue 'call is_process_running ''DIALER'''
  3850. queue 'call is_process_running ''SLIP'''
  3851. queue 'call is_process_running ''PPP'''
  3852. queue 'call is_process_running ''SLATTACH'''
  3853. queue 'call is_process_running ''SLIPPM'''
  3854. queue 'call is_process_running ''ILINK2'''
  3855. queue
  3856. queue 'if ''' || alt_dialer || ''' \= ''DIALER'','
  3857. queue '   & ''' || alt_dialer || ''' \= ''SLIP'','
  3858. queue '   & ''' || alt_dialer || ''' \= ''PPP'','
  3859. queue '   & ''' || alt_dialer || ''' \= ''SLIPPM'','
  3860. queue '   & ''' || alt_dialer || ''' \= ''ILINK2'','
  3861. queue '   & ''' || alt_dialer || ''' \= ''IN-JOY'' then'
  3862. queue '   call is_process_running ''' || alt_dialer || ''''
  3863. queue 'if stream(''' || killjoy_exe || ''', ''c'', ''query exists'') \= '''' then'
  3864. queue '   do'
  3865. queue '      ''' || killjoy_exe || ''''
  3866. queue '      call SysSleep 3 /* settle time */'
  3867. queue '   end'
  3868. queue 'call is_process_running ''IN-JOY''' 
  3869. queue 'say ''Waiting'' settle_time ''secs. before testing them all again...'''
  3870. queue 'call SysSleep settle_time'
  3871. queue
  3872. queue 'call is_process_running ''DIALER'''
  3873. queue 'call is_process_running ''SLIP'''
  3874. queue 'call is_process_running ''PPP'''
  3875. queue 'call is_process_running ''SLATTACH'''
  3876. queue 'call is_process_running ''SLIPPM'''
  3877. queue 'call is_process_running ''ILINK2'''
  3878. queue
  3879. queue 'if ''' || alt_dialer || ''' \= ''DIALER'','
  3880. queue '   & ''' || alt_dialer || ''' \= ''SLIP'','
  3881. queue '   & ''' || alt_dialer || ''' \= ''PPP'','
  3882. queue '   & ''' || alt_dialer || ''' \= ''SLIPPM'','
  3883. queue '   & ''' || alt_dialer || ''' \= ''ILINK2'','
  3884. queue '   & ''' || alt_dialer || ''' \= ''IN-JOY'' then',
  3885. queue '   call is_process_running ''' || alt_dialer || ''''
  3886. queue 'if stream(''' || killjoy_exe || ''', ''c'', ''query exists'') \= '''' then'
  3887. queue '   do'
  3888. queue '      ''' || killjoy_exe || ''''
  3889. queue '      call SysSleep 3 /* settle time */'
  3890. queue '   end'
  3891. queue 'call is_process_running ''IN-JOY''' 
  3892. queue 'say ''Press any key to exit...'''        
  3893. queue 'answer = SysGetKey(''NOECHO'')'
  3894. queue 'EXIT'
  3895. queue
  3896. queue
  3897. queue 'is_process_running:'
  3898. queue 'parse upper arg process        /* Check if it is */'
  3899. queue 'go_exe ''-cp'' process ''>nul''        /* returns RC=1 if process is running, 0 if not */'
  3900. queue 'If RC then'
  3901. queue '   do'
  3902. queue '      say process ''is running'''
  3903. queue '      if process = ''DIALER'' then'
  3904. queue '         do'
  3905. queue '        process ''-c>nul'', /* hope it''s at least v 1.33 */'
  3906. queue '        call SysSleep 3 /* settle time, IAK Dialer is funny */'
  3907. queue '        say ''   If you lost this window for a few seconds or just heard a beep'''
  3908. queue '        say ''   that is normal for closing down certain versions of IAK Dialer'''
  3909. queue '         end'
  3910. queue '   end'
  3911. queue 'else say process ''is not running'''
  3912. queue 'go ''-ka'' process ''>nul''  /* do a kill whether running or not */'
  3913. queue 'RETURN'
  3914.  
  3915. line = ''
  3916. do queued()        /* output everything in rxqueue to file */
  3917.   parse pull line
  3918.   call lineout logoff_cmd, line
  3919. end
  3920.  
  3921. call stream logoff_cmd, 'c', 'close'
  3922. say '  ' logoff_cmd 'created/updated.'
  3923. if \SysSetIcon(logoff_cmd, home || '\icons\' || logoff_ico) then
  3924.    say 'unable to attach icon for' logoff_cmd '(NON-CRITICAL ERROR)'
  3925. RETURN
  3926.  
  3927.  
  3928. /*
  3929. =======================================================
  3930. Create a program (RENEWZIP.CMD) to rename to a .ZIP file
  3931. the reply_packet ZIP file for this user that we had backed
  3932. up as a *.BAK file when last we exported posts and mail.
  3933. If something went wrong with sending/posting, this
  3934. renewzip.cmd restores the .ZIP and allows us a second shot.
  3935. =======================================================
  3936. */ 
  3937.  
  3938. create_renewzip_cmd:
  3939. home_drive
  3940. 'cd' home
  3941. renewzip_cmd = filespec('name', renewzip_cmd)
  3942. parse var renewzip_cmd renewzip '.' ext
  3943. call SysFileDelete renewzip_cmd
  3944.  
  3945. reply_packet = translate(reply_packet)
  3946.  
  3947. parse var reply_packet reply '.' ext
  3948. reply_bak = reply || '.BAK'
  3949. reply_asterisk = reply || '.*'
  3950.  
  3951. /* Now create renewzip_cmd as a .CMD file in the HOME directory */
  3952. do queued(); pull; end        /* First clear out any lines in rxqueue */ 
  3953.  
  3954. queue '/* */'
  3955. queue 'say ''' || renewzip_cmd || ''''
  3956. queue 'say ''Restores' reply_packet 'by renaming the *.BAK to *.ZIP'''
  3957. queue 'say ''Created by YARNDIAL''''s' ydinstl_cmd date() time() || ''''
  3958. queue 'say ''DIR run below should confirm restoration of the *.ZIP'''
  3959. queue 'say '''''
  3960. queue '/* Load RexxUtil if not already loaded */'
  3961. queue 'if RxFuncQuery(''SysLoadFuncs'') \= 0 then'
  3962. queue '   do'
  3963. queue '      call RxFuncAdd ''SysLoadFuncs'', ''REXXUTIL'', ''SysLoadFuncs'''
  3964. queue '      call SysLoadFuncs'
  3965. queue '   end'
  3966. queue '''@echo off'''
  3967. queue 'if stream(''' || reply_bak || ''', ''c'', ''query exists'') \= '''' then'
  3968. queue '   do'
  3969. queue '      ''copy' reply_bak reply_packet || ''''
  3970. queue '      ''dir' reply_asterisk || ''''
  3971. queue '   end'
  3972. queue 'else say ''no' reply_bak 'to restore'''
  3973. queue 'say '''''
  3974. queue 'say ''Press any key to exit...'''        
  3975. queue 'answer = SysGetKey(''NOECHO'')'
  3976.  
  3977. line = ''
  3978. do queued()        /* output everything in rxqueue to file */
  3979.   parse pull line
  3980.   call lineout renewzip_cmd, line
  3981. end
  3982.  
  3983. call stream renewzip_cmd, 'c', 'close'
  3984. say '  ' renewzip_cmd 'created/updated.'
  3985. if \SysSetIcon(renewzip_cmd, home || '\icons\' || renewzip_ico) then
  3986.    say 'unable to attach icon for' renewzip_cmd '(NON-CRITICAL ERROR)'
  3987. RETURN
  3988.  
  3989. /*
  3990. ==============================================
  3991. create_yarndial_objects()
  3992.  
  3993. Create a folder on the desktop uniquely named for
  3994. our user installation.  Into it place our objects also named
  3995. to identify them with the specific home directory for which
  3996. this installation was done.
  3997. ==============================================
  3998. */
  3999. create_yarndial_objects:
  4000.  
  4001. say 'Creating Desktop Folder object and its Program objects'
  4002.  
  4003. /* First create a Desktop Folder object for our YARNDIAL objects */
  4004.  
  4005. home = translate(home, Lowcase, Upcase)   /* to lower case */
  4006.  
  4007. classname = 'WPFolder'
  4008. folder_fore_title ='YarnDial Suite for' 
  4009. title = folder_fore_title || '^' || home
  4010. location = '<WP_DESKTOP>'
  4011. desktop_folder_object_id = '<' || title || '>'
  4012. iconfile = home || '\icons\' || ydfold1_ico        /* Animated folder icon (closed folder) */
  4013. iconnfile = home || '\icons\' || ydfold2_ico        /* Animated folder icon (open folder) */
  4014. startupdir = home
  4015. setup = 'OBJECTID=' || desktop_folder_object_id ||,
  4016.          ';ALWAYSSORT=YES' ||,
  4017.          ';ICONFILE=' || iconfile ||,
  4018.          ';ICONNFILE=1,' iconnfile
  4019.  
  4020. signal off error
  4021. if \SysCreateObject(classname, title, location, setup, 'U') then
  4022.    do
  4023.       say 'YARNDIAL FOLDER object creation unsuccessful'
  4024.       object_creation_error = 1
  4025.    end
  4026. else
  4027.   do
  4028.       say '   YARNDIAL FOLDER object created/updated successfully'
  4029.  
  4030. /* Folder created successfully? Then create all the program objects
  4031. and place them in the folder */
  4032.  
  4033. /* The desktop folder we just created is located at... */
  4034. location = desktop_folder_object_id   /* location for the rest is in the folder */
  4035.  
  4036. /* Create the object for YarnDial */
  4037.    classname = 'WPProgram'
  4038.    title = 'YarnDial for^' || home
  4039.    exename = home || '\' || yd_cmd
  4040.    iconfile = home || '\icons\' || yarndial_ico
  4041.    startupdir = home
  4042.  
  4043.    setup = 'OBJECTID=<' || title || '>' ||,
  4044.         ';ICONFILE=' || iconfile ||,
  4045.         ';EXENAME=' || exename ||,
  4046.         ';STARTUPDIR=' || startupdir
  4047.  
  4048.    if SysCreateObject(classname, title, location, setup, 'U') then
  4049.       do
  4050.          say '   YARNDIAL object created/updated successfully'
  4051.       end
  4052.    else
  4053.       do
  4054.          say 'YARNDIAL object creation unsuccessful'
  4055.          object_creation_error = 1
  4056.       end
  4057.  
  4058. /* and then do all of this until the end of the subroutine... */
  4059.  
  4060. /* Create an object for yarnshell_cmd */
  4061.    title = 'YARN Program for^' || home 
  4062.    exename = home || '\' || yarnshell_cmd
  4063.    iconfile = home || '\icons\' || yarn_ico
  4064.    startupdir = home
  4065.  
  4066.    setup = 'OBJECTID=<' || title || '>' ||,
  4067.         ';ICONFILE=' || iconfile ||,
  4068.         ';EXENAME=' || exename ||,
  4069.         ';STARTUPDIR=' || startupdir
  4070.  
  4071.    if SysCreateObject(classname, title, location, setup, 'U') then
  4072.       do
  4073.          say '  ' YARNSHELL_CMD 'object created/updated successfully'
  4074.       end
  4075.    else
  4076.       do
  4077.          say 'YRNSHELL object creation unsuccessful'
  4078.          object_creation_error = 1
  4079.       end
  4080.  
  4081. /* Create an object for yarnutil_cmd */
  4082.    title = 'YarnUtil from^' || home
  4083.    exename = home || '\' || yarnutil_cmd
  4084.    iconfile = home || '\icons\' || yarnutil_ico
  4085.    startupdir = home
  4086.  
  4087.    setup = 'OBJECTID=<' || title || '>' ||,
  4088.         ';ICONFILE=' || iconfile ||,
  4089.         ';EXENAME=' || exename ||,
  4090.         ';STARTUPDIR=' || startupdir
  4091.  
  4092.    if SysCreateObject(classname, title, location, setup, 'U') then
  4093.       do
  4094.          say '  ' YARNUTIL_CMD 'object created/updated successfully'
  4095.       end
  4096.    else
  4097.       do
  4098.          say 'YRNUTIL object creation unsuccessful'
  4099.          object_creation_error = 1
  4100.       end
  4101.  
  4102. /* Create an object for logoff_cmd */
  4103.    title = 'Logoff running from^' || home
  4104.    exename = home || '\' || logoff_cmd
  4105.    iconfile = home || '\icons\' || logoff_ico
  4106.    startupdir = home
  4107.  
  4108.    setup = 'OBJECTID=<' || title || '>' ||,
  4109.         ';ICONFILE=' || iconfile ||,
  4110.         ';EXENAME=' || exename ||,
  4111.         ';STARTUPDIR=' || startupdir
  4112.  
  4113.    if SysCreateObject(classname, title, location, setup, 'U') then
  4114.       do
  4115.          say '  ' LOGOFF_CMD 'object created/updated successfully'
  4116.       end
  4117.    else
  4118.       do
  4119.          say 'LOGOFF object creation unsuccessful'
  4120.          object_creation_error = 1
  4121.      end
  4122.  
  4123. /* Create an object for renewzip_cmd */
  4124.    title = 'Reply Zip Restorer for^' || translate(reply_packet, Lowcase, Upcase) /* to lower case */ 
  4125.    exename = home || '\' || renewzip_cmd
  4126.    iconfile = home || '\icons\' || renewzip_ico
  4127.    startupdir = home
  4128.  
  4129.    setup = 'OBJECTID=<' || title || '>' ||,
  4130.         ';ICONFILE=' || iconfile ||,
  4131.         ';EXENAME=' || exename ||,
  4132.         ';STARTUPDIR=' || startupdir
  4133.  
  4134.    if SysCreateObject(classname, title, location, setup, 'U') then
  4135.       do
  4136.          say '  ' RENEWZIP_CMD 'object created/updated successfully'
  4137.       end
  4138.    else
  4139.       do
  4140.          say 'RENEWZIP object creation unsuccessful'
  4141.          object_creation_error = 1
  4142.       end
  4143. END        /* creating program objects in the Desktop Folder we created */
  4144. if local_error_trapping then signal on error
  4145. RETURN
  4146.  
  4147. /*
  4148. =======================================================
  4149. recreate_objects_cmd()
  4150. Create a program (OBJECTS.CMD) to to be able to recreate the
  4151. YarnDial Desktop folder and objects in it.
  4152. =======================================================
  4153. */ 
  4154.  
  4155.  
  4156. recreate_objects_cmd:
  4157. /* Now create objects_cmd as a .CMD file in the HOME directory */
  4158. home_drive
  4159. 'cd' home
  4160. call SysFileDelete objects_cmd
  4161. say 'Creating a program to be able to recreate the YarnDial'
  4162. say 'desktop folder for this installation, and all of its objects'
  4163.  
  4164. do queued(); pull; end        /* First clear out any lines in rxqueue */ 
  4165.  
  4166. queue '/*' || objects_cmd || '*/'
  4167. queue 'say ''Created by YARNDIAL''''s' ydinstl_cmd date() time() || ''''
  4168. queue
  4169. queue 'say ''Re-creates a Desktop Folder object and its Program objects'''
  4170. queue 'say ''for the user whose HOME directory is'' translate(''' || home || ''')'
  4171. queue 'say '''''
  4172. queue
  4173. queue '/* Load RexxUtil if not already loaded */'
  4174. queue 'if RxFuncQuery(''SysLoadFuncs'') \= 0 then'
  4175. queue '   do'
  4176. queue '      call RxFuncAdd ''SysLoadFuncs'', ''REXXUTIL'', ''SysLoadFuncs'''
  4177. queue '      call SysLoadFuncs'
  4178. queue '   end'
  4179. queue
  4180. queue 'say ''Press any key to continue.  CTRL-C quits.'''
  4181. queue 'answer = SysGetKey(''NOECHO'')'
  4182. queue
  4183. queue 'say '''''
  4184. queue
  4185. queue '/* First create a Desktop Folder object for our YARNDIAL objects */' 
  4186. queue 'Upcase = xrange(''A'', ''Z'')'
  4187. queue 'Lowcase = xrange(''a'', ''z'')'
  4188. queue
  4189. queue 'home = translate(''' || home || ''', Lowcase, Upcase)'
  4190. queue
  4191. queue 'classname = ''WPFolder'''
  4192. queue 'folder_fore_title =''YarnDial Suite for''' 
  4193. queue 'title = folder_fore_title || ''^'' || home'
  4194. queue 'location = ''<WP_DESKTOP>'''
  4195. queue 'desktop_folder_object_id = ''<'' || title || ''>'''
  4196. queue 'iconfile = home || ''\icons\' || ydfold1_ico || '''        /* Animated folder icon (closed folder) */'
  4197. queue 'iconnfile = home || ''\icons\' || ydfold2_ico || '''        /* Animated folder icon (open folder) */'
  4198. queue 'startupdir = home'
  4199. queue 'setup = ''OBJECTID='' || desktop_folder_object_id ||,'
  4200. queue '         '';ALWAYSSORT=YES'' ||,'
  4201. queue '         '';ICONFILE='' || iconfile ||,'
  4202. queue '         '';ICONNFILE=1,'' iconnfile'
  4203. queue
  4204. queue 'if \SysCreateObject(classname, title, location, setup, ''U'') then'
  4205. queue '   do'
  4206. queue '      say ''YARNDIAL FOLDER object creation unsuccessful'''
  4207. queue '   end'
  4208. queue 'else'
  4209. queue '   do'
  4210. queue '      say ''YARNDIAL FOLDER object created/updated successfully'''
  4211. queue
  4212. queue '/* Folder created successfully? Then create all the program objects'
  4213. queue 'and place them in the folder */'
  4214. queue
  4215. queue '/* The desktop folder we just created is located at... */'
  4216. queue 'location = desktop_folder_object_id    /* location for the rest is in the folder */'
  4217. queue
  4218. queue '/* Create the object for YarnDial */'
  4219. queue '   classname = ''WPProgram'''
  4220. queue '   title = ''YarnDial for^'' || home'
  4221. queue '   exename = home || ''\' || yd_cmd || ''''
  4222. queue '   iconfile = home || ''\icons\' || yarndial_ico || ''''
  4223. queue '   startupdir = home'
  4224. queue
  4225. queue '   setup = ''OBJECTID=<'' || title || ''>'' ||,'
  4226. queue '        '';ICONFILE='' || iconfile ||,'
  4227. queue '        '';EXENAME='' || exename ||,'
  4228. queue '        '';STARTUPDIR='' || startupdir'
  4229. queue
  4230. queue '   if SysCreateObject(classname, title, location, setup, ''U'') then'
  4231. queue '      do' 
  4232. queue '         say ''YARNDIAL object created/updated successfully'''
  4233. queue '      end'
  4234. queue '   else'
  4235. queue '      do'
  4236. queue '         say ''YARNDIAL object creation unsuccessful'''
  4237. queue '      end'
  4238. queue
  4239. queue '/* and then do all of this until the end of the subroutine... */'
  4240. queue
  4241. queue '/* Create an object for yarnshell_cmd */'
  4242. queue '   title = ''YARN Program for^'' || home' 
  4243. queue '   exename = home || ''\' || yarnshell_cmd || ''''
  4244. queue '   iconfile = home || ''\icons\' || yarn_ico || ''''
  4245. queue '   startupdir = home'
  4246. queue
  4247. queue '   setup = ''OBJECTID=<'' || title || ''>'' ||,'
  4248. queue '        '';ICONFILE='' || iconfile ||,'
  4249. queue '        '';EXENAME='' || exename ||,'
  4250. queue '        '';STARTUPDIR='' || startupdir'
  4251. queue
  4252. queue '   if SysCreateObject(classname, title, location, setup, ''U'') then'
  4253. queue '      do'
  4254. queue '         say YARNSHELL_CMD ''object created/updated successfully'''
  4255. queue '      end'
  4256. queue '   else'
  4257. queue '      do'
  4258. queue '         say ''YRNSHELL object creation unsuccessful'''
  4259. queue '      end'
  4260. queue
  4261. queue '/* Create an object for yarnutil_cmd */'
  4262. queue '   title = ''YarnUtil from^'' || home'
  4263. queue '   exename = home || ''\' || yarnutil_cmd || ''''
  4264. queue '   iconfile = home || ''\icons\' || yarnutil_ico || ''''
  4265. queue '   startupdir = home'
  4266. queue
  4267. queue '   setup = ''OBJECTID=<'' || title || ''>'' ||,'
  4268. queue '        '';ICONFILE='' || iconfile ||,'
  4269. queue '        '';EXENAME='' || exename ||,'
  4270. queue '        '';STARTUPDIR='' || startupdir'
  4271. queue
  4272. queue '   if SysCreateObject(classname, title, location, setup, ''U'') then'
  4273. queue '      do'
  4274. queue '         say YARNUTIL_CMD ''object created/updated successfully'''
  4275. queue '      end'
  4276. queue '   else'
  4277. queue '      do'
  4278. queue '         say ''YRNUTIL object creation unsuccessful'''
  4279. queue '      end'
  4280. queue
  4281. queue '/* Create an object for logoff_cmd */'
  4282. queue '   title = ''Logoff running from^'' || home'
  4283. queue '   exename = home || ''\' || logoff_cmd || ''''
  4284. queue '   iconfile = home || ''\icons\' || logoff_ico || ''''
  4285. queue '   startupdir = home'
  4286. queue
  4287. queue '   setup = ''OBJECTID=<'' || title || ''>'' ||,'
  4288. queue '        '';ICONFILE='' || iconfile ||,'
  4289. queue '        '';EXENAME='' || exename ||,'
  4290. queue '        '';STARTUPDIR='' || startupdir'
  4291. queue
  4292. queue '   if SysCreateObject(classname, title, location, setup, ''U'') then'
  4293. queue '      do'
  4294. queue '         say LOGOFF_CMD ''object created/updated successfully'''
  4295. queue '      end'
  4296. queue '   else'
  4297. queue '      do'
  4298. queue '         say ''LOGOFF object creation unsuccessful'''
  4299. queue '     end'
  4300. queue
  4301. queue '/* Create an object for renewzip_cmd */'
  4302. queue '   title = ''Reply Zip Restorer for^'' || translate(''' || reply_packet || ''', Lowcase, Upcase) /* to lower case */' 
  4303. queue '   exename = home || ''\' || renewzip_cmd || ''''
  4304. queue '   iconfile = home || ''\icons\' || renewzip_ico || ''''
  4305. queue '   startupdir = home'
  4306. queue
  4307. queue '   setup = ''OBJECTID=<'' || title || ''>'' ||,'
  4308. queue '        '';ICONFILE='' || iconfile ||,'
  4309. queue '        '';EXENAME='' || exename ||,'
  4310. queue '        '';STARTUPDIR='' || startupdir'
  4311. queue
  4312. queue '   if SysCreateObject(classname, title, location, setup, ''U'') then'
  4313. queue '      do'
  4314. queue '         say RENEWZIP_CMD ''object created/updated successfully'''
  4315. queue '      end'
  4316. queue '   else'
  4317. queue '      do'
  4318. queue '         say ''RENEWZIP object creation unsuccessful'''
  4319. queue '      end'
  4320. queue 'END  /* creating program objects in the Desktop Folder we created */ ' 
  4321. queue 'say '''''
  4322. queue 'say ''Press any key to exit...'''        
  4323. queue 'answer = SysGetKey(''NOECHO'')'
  4324.  
  4325. line = ''
  4326. do queued()        /* output everything in rxqueue to file */
  4327.   parse pull line
  4328.   call lineout objects_cmd, line
  4329. end
  4330.  
  4331. call stream objects_cmd, 'c', 'close'
  4332. say '  ' objects_cmd 'created/updated successfully.'
  4333.  
  4334. RETURN
  4335.  
  4336. /*
  4337. =================
  4338. encry()
  4339.  
  4340. called by command line
  4341.         YDINSTL encrypt someword
  4342. where someword is encrypted
  4343. =================
  4344. */
  4345. encry:
  4346. o21 = '&\<=>|()! *+"''-/,#$%.0123456789:;?'
  4347. o22 = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^'
  4348. o23 = '_`abcdefghijklmnopqrstuvwxyz{}~'
  4349. e21 = '&\<=>|()u *+"''-/,MI$kUHgW[_A5%w~Fh'
  4350. e22 = 't?K^l0jJP{98xBadb1nZimRyY]4}`o'
  4351. e23 = 'E;67V@vS:C.sNGzcefQpqTr!2#XDLO3'
  4352.  
  4353. candidate = translate(candidate, o21||o22||o23, e21||e22||e23)
  4354.  
  4355. if encrypt then
  4356. do
  4357.    say ''
  4358.    our_dir = directory()        /* Where we are executing this pgm from */
  4359.    leng = length(candidate)
  4360.    call SysFileDelete our_dir || '\word.$$$'
  4361.    DL1 = 'encrypted=' || candidate,
  4362.    || crlf || 'Encrypted text is the' leng 'character string to the',
  4363.    || crlf || 'right of the FIRST equals sign in encrypted=' || crlf,
  4364.    || crlf || 'Be careful to select only those those' leng 'characters.',
  4365.    || crlf || 'for cutting-and-pasting.' || crlf
  4366.    DL2 = 'Do not be concerned if there is more than one equals',
  4367.    || crlf || 'sign, since characters may have been legitimately',
  4368.    || crlf || 'encoded to equals signs.',
  4369.    || crlf || '',
  4370.    || crlf || 'Remember to Erase' our_dir || '\word.$$$ when done.' 
  4371.    say DL1
  4372.    say 'That line is also stored as ASCII text in'
  4373.    say our_dir || '\word.$$$ for cutting-and-pasting.'
  4374.    say ''
  4375.    say DL2
  4376.    call lineout our_dir || '\word.$$$', DL1
  4377.    call lineout our_dir || '\word.$$$', DL2
  4378.    call stream our_dir || '\word.$$$', 'c', 'close'
  4379.    RETURN
  4380. end
  4381.  
  4382.  
  4383.  
  4384. /*
  4385. ==============================================
  4386. HANDLING OF ERROR TRAPS
  4387.  
  4388. ReXX Errors (failure, halt, syntax, novalue, error)
  4389. that occur with SIGNAL ON XXXXX (XXXXX = failure,
  4390. halt, etc.) are diverted (jump) to one of these
  4391. where the error and the offending line are identified.
  4392. ==============================================
  4393. */
  4394.  
  4395.    FAILURE:
  4396.    say 'Rexx FAILURE condition' rc 'in line' sigl ':' errortext(rc)
  4397.    say sourceline(sigl)
  4398.  
  4399.    call beep 300, 500
  4400.    signal goodbye
  4401.    RETURN
  4402.  
  4403.  
  4404.    HALT:
  4405.    say 'Rexx HALT condition' rc 'in line' sigl ':' errortext(rc)
  4406.    say sourceline(sigl)
  4407.  
  4408.    call beep 300, 500
  4409.    signal goodbye
  4410.    RETURN
  4411.  
  4412.  
  4413.    SYNTAX:
  4414.    say 'Rexx SYNTAX error' rc 'in line' sigl ':' errortext(rc)
  4415.    say sourceline(sigl)
  4416.  
  4417.    call beep 300, 500
  4418.    signal goodbye
  4419.    RETURN
  4420.  
  4421.  
  4422.    NOTREADY:
  4423.    say 'Rexx NOTREADY condition' rc 'in line' sigl ':' errortext(rc)
  4424.    say sourceline(sigl)
  4425.  
  4426.    call beep 300, 500
  4427.    signal goodbye
  4428.    RETURN
  4429.  
  4430.  
  4431.    ERROR:
  4432.    say 'Rexx ERROR condition' rc 'in line' sigl ':' errortext(rc)
  4433.    say sourceline(sigl)
  4434.  
  4435.    call beep 300, 500
  4436.    signal goodbye
  4437.    RETURN
  4438.  
  4439.  
  4440.    NOVALUE:
  4441.    say 'Rexx NOVALUE condition' rc 'in line' sigl ':' errortext(rc)
  4442.    say sourceline(sigl)
  4443.  
  4444.    call beep 300, 500
  4445.    signal goodbye
  4446.    RETURN
  4447.  
  4448. /*
  4449. ==============================================
  4450. GOODBYE()
  4451.  
  4452. Final "we did it" or "we didn't" message, and exit
  4453. ==============================================
  4454. */
  4455. GOODBYE:
  4456. say ''
  4457. if completed & findfile_ErrNum = 0 then
  4458.    do
  4459.       say 'Installation completed successfully'
  4460.       if object_creation_error then
  4461.          do
  4462.         say 'EXCEPT for desktop object creation.  All .CMD files'
  4463.         say 'are in the' home 'directory, though.'
  4464.          end
  4465.    end
  4466. if completed & findfile_ErrNum > 0 then
  4467.    do
  4468.       call SysCls
  4469.       say 'Installation completed.'
  4470.    end
  4471. if \completed | findfile_ErrNum > 0 | other_err then
  4472.    do
  4473.       say ''
  4474.       say '*************'
  4475.       say '   WARNING:'
  4476.       say 'An error was encountered during the installation'
  4477.       say '   or'
  4478.       say 'the installation was aborted before completion'
  4479.       say '*************'
  4480.       say ''
  4481.       call beep 262, 200
  4482.    end 
  4483.  
  4484. if completed then
  4485.    do
  4486.       say 'You may want to print out and inspect' ydparms_dat
  4487.       say 'Changes to it may be made using an ASCII editor such as the'
  4488.       say 'OS/2 System Editor without having to re-run' ydinstl_cmd
  4489.       say ''
  4490.    end
  4491.  
  4492. if findfile_ErrNum > 0 then
  4493.    do
  4494.       if findfile_ErrNum > 0 then
  4495.          do
  4496.         say 'ERROR(S):'
  4497.         do while findfile_ErrNum > 0
  4498.          say 'Unable to locate any instance of',  
  4499.          unfound_file.findfile_ErrNum
  4500.          findfile_ErrNum = findfile_ErrNum - 1
  4501.         end
  4502.          end
  4503.    end
  4504. say ''
  4505. say ijparms_errmsg1
  4506. say ijparms_errmsg2
  4507.  
  4508. say edit_dialup_string_msg
  4509. say 'YarnDial installation over at' time()
  4510. time = time('E')
  4511. time = time/60
  4512. time = format(time, ,1) 
  4513. say 'Elapsed time:' time 'minutes.'
  4514. say 'Press any key to exit...'
  4515. answer = SysGetKey('NOECHO')
  4516. call SysDropFuncs
  4517. x = endLocal()
  4518. EXIT
  4519. RETURN
  4520.  
  4521. /*
  4522. ==============================================
  4523. welcome_to_this_installer()
  4524.  
  4525. Long welcome message.  Put here for a neater
  4526. program, though we call to it near startup.
  4527. ==============================================
  4528. */
  4529. welcome_to_this_installer:
  4530. call SysCls
  4531. say ''
  4532. say 'Welcome! YARNDIAL installer, v.' version 'of' translate(ydinstl_cmd)
  4533. say '(c) 1996 Jerry Levy, Marblehead, MA USA (all rights reserved).'
  4534. say ''
  4535. say 'ABOUT THIS INSTALLER'
  4536. say 'This will install YarnDial on your machine, copying files to the'
  4537. say 'Yarn Home directory.  It should be very straightforward to use if'
  4538. say 'you have Yarn and Souper already up and running and did a pretty'
  4539. say 'much by-the-book installation of them.'
  4540. say ''
  4541. say 'If you have more than one Yarn home directory (Yarn allows separate'
  4542. say 'home directories for separate users or providers), you can select a'
  4543. say 'default or specify which one(s) to install to.'
  4544. say ''
  4545. say 'The installer creates a unique' translate(ydparms_dat) 'data file and a suite'
  4546. say 'of customized Rexx .CMD programs, all of which get stored in the'
  4547. say 'particular home directory you are installing to.  A YarnDial'
  4548. say 'Desktop Folder is created to house program objects.'
  4549. say ''
  4550. say translate(ydparms_dat) 'can be edited after the installation.'
  4551. say ''
  4552. say '(Continued -- Press any key)'
  4553. call SysGetKey 'NOECHO'
  4554. call SysCls
  4555. say ''
  4556. say 'INSTRUCTIONS (cont''d)'
  4557. say 'You will be asked what kind of zip and unzip utilities you are using.'
  4558. say 'Read' yd_doc 'if you need help.'
  4559. say ''
  4560. say 'No changes are made to your system until the very end of the'
  4561. say 'installation, so you may run through it without risk and escape out'
  4562. say 'before the end.'
  4563. say ''
  4564. say ''
  4565. say '' 
  4566. say 'Press any key to continue the installation (ESC quits)'
  4567. if SysGetKey('NOECHO') = Escape then signal goodbye
  4568. RETURN
  4569.  
  4570. /*
  4571. ==============================================
  4572. initialize_variables():
  4573.  
  4574. We make an early call to this to initialize
  4575. variables.  A long list so we put the routine
  4576. at the end of the program for neatness sake.
  4577. ==============================================
  4578. */
  4579. initialize_variables:
  4580. /* Default filenames and other stuff we need.
  4581.  
  4582. These are initialized to something because we want default values */
  4583. yarn_exe = 'YARN.EXE'
  4584. import_exe = 'IMPORT.EXE'
  4585. export_exe = 'EXPORT.EXE'
  4586. expire_exe = 'EXPIRE.EXE'
  4587. rebuild_exe = 'REBUILD.EXE'
  4588. filter_exe = 'FILTER.EXE'
  4589. souper_exe = 'SOUPER.EXE'
  4590. vsoup_exe = 'VSOUP.EXE'
  4591. yarnshell_cmd = 'YRNSHELL.CMD'
  4592. yarnutil_cmd = 'YRNUTIL.CMD'
  4593. renewzip_cmd = 'RENEWZIP.CMD'
  4594. objects_cmd = 'OBJECTS.CMD'
  4595. logoff_cmd = 'LOGOFF.CMD'
  4596. go_exe = 'GO.EXE'
  4597. IAKdialer_exe = 'DIALER.EXE'
  4598. slippm_exe = 'SLIPPM.EXE'
  4599. ilink2_exe = 'ILINK2.EXE'
  4600. injoy_exe = 'IN-JOY.EXE'
  4601. killjoy_exe = 'KILLJOY.EXE'
  4602. hosts_dat = 'HOSTS.DAT'
  4603. alt_dialer_exe = SLIPPM_EXE
  4604. os2_zip_exe = 'ZIP.EXE'
  4605. os2_unzip_exe = 'UNZIP.EXE'
  4606. vsoup = 0
  4607. os2_zip_options = '-0m'
  4608. os2_unzip_options = '-o'
  4609. msdos_zip_exe = 'PKZIP.EXE'
  4610. msdos_unzip_exe = 'PKUNZIP.EXE'
  4611. msdos_zip_options = '-m -u -o'
  4612. msdos_unzip_options = '-o'
  4613. msdos_cmd_interp = 'CMD.EXE /C'
  4614. souper_getmail_std_options = '-i -n'
  4615. souper_getmail_xtra_options = '' 
  4616. souper_getnews_std_options = '-i -m' 
  4617. souper_getnews_xtra_options = '' 
  4618. souper_send_std_options = '-i -s'
  4619. souper_send_xtra_options = ''
  4620. vsoup_getmail_std_options = '-i -n'
  4621. vsoup_getmail_xtra_options = '' 
  4622. vsoup_getnews_std_options = '-i -m' 
  4623. vsoup_getnews_xtra_options = '' 
  4624. vsoup_send_std_options = '-i -s'
  4625. vsoup_send_xtra_options = ''
  4626.  
  4627.  
  4628. /*
  4629. ===============
  4630. We set most of these remaining variables initially to a blank.
  4631. Some settings will be revised in the course of the installation.
  4632. We do not want the yarndial data file we create
  4633. (YD_PARMS.DAT) to be all cluttered up with error
  4634. indications which is what happens if we don't assign
  4635. the blanks.
  4636. ===============
  4637. */
  4638. HOME = ''
  4639. YARN = ''
  4640. connection_type = ''
  4641. interface_removal = 0
  4642. choose = ''
  4643. user = ''
  4644. host = ''
  4645. account=''
  4646. ASK = ''
  4647. IS1 = ''
  4648. IS2 = ''
  4649. RS1 = ''
  4650. RS2 = ''
  4651. FS1 = ''
  4652. FS2 = ''
  4653. PIN = ''
  4654. wait = '' 
  4655. zip_exe = ''
  4656. unzip_exe = ''
  4657. host_app = ''
  4658. dialup_string = ''
  4659. do_not_kill = 0
  4660. dnk_string = '1234567'
  4661. Use_dialup_string = 'NO'
  4662. PROVIDER = ''
  4663. LOGIN_ID = ''
  4664. PWD = ''
  4665. SAVE_PWD = ''
  4666. PHONE_NUMBER = ''
  4667. HANGUP =  ''
  4668. SCRIPT = ''
  4669. SERVICE = ''
  4670. YOURIP = ''
  4671. DESTIP = ''
  4672. NETMASK = ''
  4673. MTU_SIZE = ''
  4674. VJ_COMP = ''
  4675. PRIMARY_INF = ''
  4676. HOSTNAME = ''
  4677. DOMAIN_NAME = ''
  4678. DNS = ''
  4679. DNS2 = ''
  4680. DEFAULT_NEWS = ''
  4681. DEFAULT_WWW = ''
  4682. DEFAULT_GOPHER = ''
  4683. MAIL_GW = ''
  4684. POPSRVR = ''
  4685. REPLY_DOMAIN = ''
  4686. REPLY_ID = ''
  4687. POP_ID = ''
  4688. POP_PWD = ''
  4689. MODEM_TYPE = ''
  4690. COMPORT = ''
  4691. BAUD = ''
  4692. DATABITS = ''
  4693. PARITY =  ''
  4694. DIAL_MODE = ''
  4695. PREFIX = ''
  4696. PREFIX_ANS = ''
  4697. INIT = ''
  4698. INIT2 = ''
  4699. DISABLE = ''
  4700. DISABLE_SEQ = ''
  4701. DIAL_PREFIX = ''
  4702. AUTOSTART = ''
  4703. TOTAL_CONNECT = ''
  4704.  
  4705. RETURN
  4706. 
  4707.  
  4708.  
  4709.